您好,感谢回复
当您配置了对某个fault的reaction是触发IRQ之后,如果硬件检测到该异常,则会触发alarm中断,并在中断处理函数中处理该fault,关于misc_irq, 没看到更多代码描述,可能是用于超时等。
关于寄存器的配置,您可以参考enable_rs_channel函数。
BSP端的代码是基于Linux的标准接口开发的,因此并没有提供类似M核端RTD类型的正式API说明,也没有相关联的developer's guide, 因此具体细节建议您同时参考S32GRM中的描述,以及Linux中的源代码实现进行进一步了解。
BR
Chenyin
Hello, @zhijie
感谢回复
1. 中断用于通知系统,比如出现了FCCU中配置的错误。
2. 表示相关fault的编号,具体含义可以参考S32G2/3 RM。
3. 就是配置对相应事件的处理方法,比如不操作或者是触发中断等等。
4. 从代码可以看到,就是将FCCU置于配置模式进行相应操作。
5. 这些就是相关功能的掩码,比如是否使能相应中断,是否使能NMI等。
6. 当前 Linux FCCU 驱动程序不支持用户从上层(比如user space)获取状态,客户需要自行实现此功能。
目前,总体而言,BSP中的驱动只支持通过dts来配置FCCU,功能比较有限,建议您参考S32GRM中的FCCU章节了解FCCU的各种状态及其他细节,并按照实际需要增加功能。
BR
Chenyin
Hello Chenyin
谢谢指导
继续问一下:
1 irq_misc_handler和irq_alarm_handler 这两个中断各负责什么?
68.3.6.2.3Recover a software-recoverable non-critical fault
1. Resolve the source of the software-recoverable non-critical fault. //如何解决?
2. Unlock the NCF_Sa registers (NCFK[NCFK]) using a 32-bit write.
3. Initiate clearing of the unrecovered-fault indicator for the software-recoverable non-critical fault (NCF_Sa[NCFSn]) using a 32-bit write.
FCCU initiates the OP12 operation
4.
Check the operation status (CTRL[OPS]).
•If the operation status is In Progress, go to step 4.
•If the operation status is Successful, go to step 5.
•If the operation status is Aborted, go to step 2.
5.
Check the unrecovered-fault indicator for the software-recoverable non-critical fault (NCF_Sa[NCFSn]).
•If the indicator indicates no unrecovered fault, the fault has been recovered. Stop.
•If the indicator still indicates an unrecovered fault, go to step 2.
fccu: fccu@4030c000 {
compatible = "nxp,s32cc-fccu";
reg = <0x0 0x4030c000 0x0 0x3000>;
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "fccu_alarm",
"fccu_misc";
clocks = <&clks S32CC_SCMI_CLK_FCCU_MODULE>;
clock-names = "fccu";
/* A53 NCF fault list */
nxp,ncf_fault_list = <0 10 35 36 37 38>;
nxp,ncf_actions = <S32CC_FCCU_REACTION_ALARM
S32CC_FCCU_REACTION_ALARM
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE>;
status = "disabled";
};
查看设备树:
问题1:这个两个中断在什么条件下发生
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "fccu_alarm",
"fccu_misc";
问题2: 0 40 35 36 37 38代表什么含义
nxp,ncf_fault_list = <0 10 35 36 37 38>;
问题3:这些REACTION,有什么作用?
nxp,ncf_actions = <S32CC_FCCU_REACTION_ALARM
S32CC_FCCU_REACTION_ALARM
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE
S32CC_FCCU_REACTION_NONE>;
问题4:rs_channel 有什么作用?