Hi,
1)How to use the overflow interrupt function of the PWM module in the MCAL library? In S32DS, there isn't a callback function setting like in the IP layer. How should I use this function?
2)There is also a question. When using interrupts, the names of the interrupt functions in the platform module must be the same as those in the MCAL. Are these fixed function names and cannot be customized?
已解决! 转到解答。
To enable the Time Overflow Interrupt, please follow these steps using the Peripheral Tool in ConfigTools:
Configure the Interrupt in the Platform Driver (Interrupt Controller → PlatformIsrConfig):
Set the Notification Function in the PWM Driver (PWMChannelConfigSet → PwmChannel):
In Code:
Regarding your second question. Yes, the interrupt names are predefined and cannot be customized. You can find all the relevant definitions in the S32K148_COMMON.h file. Additionally, for the interrupt handlers, most of them are already defined. For example, in the case of FTM in PWM mode, the handlers are located in the Ftm_Pwm_Ip_Irq.h file.
BR, VaneB
To enable the Time Overflow Interrupt, please follow these steps using the Peripheral Tool in ConfigTools:
Configure the Interrupt in the Platform Driver (Interrupt Controller → PlatformIsrConfig):
Set the Notification Function in the PWM Driver (PWMChannelConfigSet → PwmChannel):
In Code:
Regarding your second question. Yes, the interrupt names are predefined and cannot be customized. You can find all the relevant definitions in the S32K148_COMMON.h file. Additionally, for the interrupt handlers, most of them are already defined. For example, in the case of FTM in PWM mode, the handlers are located in the Ftm_Pwm_Ip_Irq.h file.
BR, VaneB