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
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