Critical regions S32K3

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Critical regions S32K3

1,519件の閲覧回数
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

ラベル(1)
0 件の賞賛
4 返答(返信)

1,509件の閲覧回数
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 件の賞賛

1,484件の閲覧回数
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 件の賞賛

1,425件の閲覧回数
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 件の賞賛

1,033件の閲覧回数
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 件の賞賛