Critical regions S32K3

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Critical regions S32K3

1,505 Views
ola_gook
Contributor III

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

Labels (1)
0 Kudos
4 Replies

1,495 Views
ola_gook
Contributor III

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

0 Kudos

1,470 Views
ola_gook
Contributor III

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?

 

0 Kudos

1,411 Views
namnguyenviet
NXP Employee
NXP Employee

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

0 Kudos

1,019 Views
stefano_alloi
Contributor II

Hello,

 

are the functions OsIf_SuspendAllInterrupts() and OsIf_ResumeAllInterrupts() the equivalent of the S32K1xx's macros ENABLE_INTERRUPTS and DISABLE_INTERRUPTS()?

Thank you

Stefano

0 Kudos