Using S32SDK: osif conflicts with my custom scheduler

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

Using S32SDK: osif conflicts with my custom scheduler

1,244 次查看
Joao_Roscoe
Contributor III

I'm porting an existing codebase (written to run in another M4F MCU) to run in S32K144.

The existing baremetal implementation includes a simple scheduler that uses SysTick, so I started there, by writing the MCU initialization code, including general clock configuration and a SysTick_Handler() function.

Also, I wrote the glueing code allowing my low level code to use SDK pins driver functions to control GPIO (IRQ support is still tbd, but I already have a functional led blinker, based on my scheduler, timed by SysTick.

Next, I wanted to write the glueing code to use lpuart driver, but ran into a problem: lpuart driver wants to use OSIF, and osif_baremetal.c uses SysTick timer, so I'm stuck.

I'm interested in preserving the existing code structure, including the existing scheduler, to minimize the need to change upper level code. What would be the easiest way to use the SDK avoiding suck conflict situations?

Best regards,

Joao

0 项奖励
回复
1 回复

1,236 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Joao,

I can't see many options. Either rewrite your scheduler to use another timer or don't use SDK functions and write own driver instead of those functions. That's all I can recommend.

Regards,

Lukas

0 项奖励
回复