RISC-V MCU中文社区

關於interrupt的疑問

发表于 GD32VF103 MCU 2020-10-08 16:59:40
4
3721
0

在nmsis的文件中提到一個macro為__INTERRUPT


具體的使用是對compiler提示這個function是一個interrupt handler


但我在BSP內,並未看到有任何地方使用這個macro

也沒看到有任何interrupt handler使用到

SAVE_IRQ_CSR_CONTEXT()



喜欢0
用户评论 (4)
  • 華仔

    2020-10-12 14:25:48 華仔 1#

    Patrick

    發帖之後我後來看了一下,大致了解什麼是vector interrupt non-vector interrupt了... 另外我想問一下,RISC-V原本只支持vector interrupt嗎?也就是non-vector interrupt算是芯來額外擴充的,是嗎?

    RISC-V标准的只支持非向量中断,向量中断是后来通过CLIC增加的。CLIC的spec参见 https://github.com/riscv/riscv-fast-interrupt/blob/master/clic.adoc

  • 领主文

    2020-10-09 19:11:22 领主文 2#

    Patrick

    發帖之後我後來看了一下,大致了解什麼是vector interrupt non-vector interrupt了... 另外我想問一下,RISC-V原本只支持vector interrupt嗎?也就是non-vector interrupt算是芯來額外擴充的,是嗎?

    向量和非向量中断这部分是eclic的内容

  • Patrick

    2020-10-09 18:44:30 Patrick 3#

    领主文

    如果使用到__INTERRUPT这个宏,则表示该中断位ECLIC的Vector Interrupt,参见例子 https://github.com/Nuclei-Software/nuclei-sdk/blob/master/application/baremetal/demo_eclic/demo_eclic.c

    关于中断的介绍 https://doc.nucleisys.com/nmsis/core/core_template_intexc.html#vector-interrupt-sw-handler

    發帖之後我後來看了一下,大致了解什麼是vector interrupt non-vector interrupt了... 另外我想問一下,RISC-V原本只支持vector interrupt嗎?也就是non-vector interrupt算是芯來額外擴充的,是嗎?

  • 领主文

    2020-10-09 10:07:35 领主文 4#

    如果使用到__INTERRUPT这个宏,则表示该中断位ECLIC的Vector Interrupt,参见例子 https://github.com/Nuclei-Software/nuclei-sdk/blob/master/application/baremetal/demo_eclic/demo_eclic.c

    关于中断的介绍 https://doc.nucleisys.com/nmsis/core/core_template_intexc.html#vector-interrupt-sw-handler

Patrick

Patrick 实名认证

懒的都不写签名

积分
问答
粉丝
关注
  • RV-STAR 开发板
  • RISC-V处理器设计系列课程
  • 培养RISC-V大学土壤 共建RISC-V教育生态
RV-STAR 开发板