I am trying to create critical regions with temporarily disabled interrupts in an S32K3 program.
(Note: no such label exists to tag this message with)
(SW32K3_RTD_4_4_2_0_0_D2203)
The only functions I find are:
system.c (exported in system.h)
Sys_SuspendInterrupts/Sys_ResumeInterrupts
The problem with them is that
1. They require me to add -DMCAL_ENABLE_USER_MODE_SUPPORT to my CC build string
2. They cause linking to fail since startup_getControlRegisterValue cannot be located anywhere. (I can't find it defined anywhere in the RTD)
All of the above makes me wonder if I am doing this the wrong way altogether?
Regards
Just found the missing startup_ function in the startup_cm7.s file.
Original question is still valid. Is this the correct way of creating critical regions?
Regards
Further investigations led me to OsIf_SuspendAllInterrupts/OsIf_ResumeAllInterrupts
This does not seem to require MCAL_ENABLE_USER_MODE_SUPPORT so probably the best method?
Hello,
Sorry for late reply. About critical regions implementation, you can refer to the RTE driver. In fact, OsIf_SuspendAllInterrupts() and OsIf_ResumeAllInterrupts() are two used functions.
Best Regards,
Nam
Hello,
are the functions OsIf_SuspendAllInterrupts() and OsIf_ResumeAllInterrupts() the equivalent of the S32K1xx's macros ENABLE_INTERRUPTS and DISABLE_INTERRUPTS()?
Thank you
Stefano