s32k144 Relation CSEC_DRV_Init and RTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k144 Relation CSEC_DRV_Init and RTOS

跳至解决方案
1,332 次查看
kmh48301
Contributor IV

Hi

I found CSEC_DRV_Init(SDK Functoin) has some relation with RTOS.

I have two project.

 

One is using RTOS which is generated from The Processor Expert component. (Let's Say Project A)

And the other is not using any OS. (Let's Say Project B)

 

In Project A, CSEC_DRV_Init function makes this error.

kmh48301_0-1637542998535.png

<My board is already partitioned for CSEc>

 

In Project B, CSEC_DRV_Init function works well.

and I checked Csec functions all works normally, as well.

 

and I removed the line "OSIF_TimeDelay(0U);" in CSEC_DRV_Init function in Project A.

and I found It works.

 

Can you explain me why the  "OSIF_TimeDelay(0U);" in CSEC_DRV_Init function makes 

this problem? 

i didn't even start the RTOS scheduler.

And Can I remove that line??

 

Thanks

Best Regards

Phillip

0 项奖励
回复
1 解答
1,288 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It is common practice to have initialization task to initialize all needed resources and then other application tasks are created and started.

I can remember this discussion, you can take a look:

https://www.freertos.org/FreeRTOS_Support_Forum_Archive/March_2017/freertos_What_is_normal_method_fo...

If you want to initialize CSE before starting the scheduler, the only option is to modify the driver. However, this is not recommended by us.

Regards,

Lukas

在原帖中查看解决方案

3 回复数
1,312 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Phillip,

this is the key point:

"i didn't even start the RTOS scheduler."

If a module uses OS services (OSIF is OS service) then it is mandatory to call the functions from tasks after starting the scheduler.

Regards,

Lukas

0 项奖励
回复
1,303 次查看
kmh48301
Contributor IV

Hi Lukas

Thank you for replying.

 

But I need to call "CSEC_DRV_Init" before starting scheduler.

what can I do?

 

 

Thanks

Best Regards

Phillip

0 项奖励
回复
1,289 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

It is common practice to have initialization task to initialize all needed resources and then other application tasks are created and started.

I can remember this discussion, you can take a look:

https://www.freertos.org/FreeRTOS_Support_Forum_Archive/March_2017/freertos_What_is_normal_method_fo...

If you want to initialize CSE before starting the scheduler, the only option is to modify the driver. However, this is not recommended by us.

Regards,

Lukas