The S32K311 chip cannot enter the PIT interrupt Software environment: S32DS 3.6.0 RTD 6.0.0 The program did not enter an interrupt during execution, and pit_notification was not called. Software environment: S32DS 3.6.0 RTD 6.0.0 Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 I added a breakpoint inside the function to test it, but the function wasn’t called. What could be the possible reasons for this? The counter is incrementing normally, and no interrupt has been triggered. Could different software versions be a factor? Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
Currently, I do not have access to an S32K311 board. However, I tested the same configuration and code on an FRDM-A-S32K312, and I was able to confirm that PitNotification is called and the counter increments as expected.
Could you set a breakpoint inside the notification function to verify whether it is being called?
BR, VaneB Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 When running at full speed, pit_notification is not triggered , and the PitCount value remains at 0. The register parameters when paused are shown in the figure. Could this be related to the clock configuration? The configuration is as follows: Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
I was able to test your code on my side using an S32K311EVB, and everything is working as expected.
To help rule out any issues related to your custom hardware, could you please try switching the clock source to FIRC and see if there is any change in the behavior? Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
As observed in your code, the counter only increments when PitNotification is called. This indicates that the PIT interrupt is being triggered correctly.
For a simpler and more visible test, you can use printf to output the counter value inside the PitNotification function. If you are able to see the printed values, this will further confirm that the interrupt is being executed as expected.
For example, I implemented it as follows:
Also, if you need help setting up printf, refer to the thread how to use the printf function in S32DS 3.5? Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
It seems that the problem might not be software related; it may instead be associated with your custom board. Do you have access to another board with an S32K311 device that you could use to run the same test for comparison? Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 It also fails to enter pit_notifaction when using the internal clock. Furthermore, communication interrupts and other interrupts do not function correctly. I tested the same program and configuration on an S32K312, and it ran normally. Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 There are currently no other boards equipped with the S32K311, and several of the same boards exhibit the same problem. Only the S32K312 chip runs normally with the same program and configuration. The cause of the K311 malfunction has not been found. Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
Since the code is working as expected on my side with both the FRDM-A-S32K312 and the S32K31XEVB-Q100, and also on your side using the S32K312, it seems that the issue might not be software-related.
Based on the behavior you described, this could potentially be related to the hardware. However, it is difficult to determine the exact root cause without further analysis. It might be helpful to take a look at the S32K31XEVB-Q100 schematic and the Hardware Design Guidelines for S32K3xx Microcontrollers file (included in the S32K3 General Purpose Hardware Design Package) to compare your custom board against the recommended design practices.
If you think the issue could be related to the MCU itself, please contact your NXP representative or the distributor from whom the parts were purchased for further assistance. Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 During testing, adding an LED toggle function in the `Pit_notifaction` function revealed that after the program download was complete, the board needed to be powered on again for the LED to blink, indicating that an interrupt had been entered. However, a power cycle was required after each download for the program to run normally, making it impossible to enter debug mode. Re: S32K311 芯片 pit无法进入中断 软件环境 S32DS 3.6.0 RTD 6.0.0 Hi @Finnc
Have you tried using another debugger? Also, are you still working with the code you initially shared?
View full article