2022-11-29 10:42 PM
I'm working in a project of OTA update for the SPC570s MCU.I have modified the bootloader program to wait until CAN frames come. If there is not any CAN frame, the bootloader will execute the application code in the flash after a small delay. This is working for the application codes which are not having RTOS.
2022-12-09 07:36 AM
Hello,
RTOS is using PIT0 channel 0 to manage time on SPC5 platforms
try to add this function at then end of systimer.c in OSAL component:
#include "lldconf.h"
void test_sysTimeStop(void) {
if (PIT_0.CH[0].TCTRL.R != 0U){
PIT_0.CH[0].TCTRL.R = 0U; /* Timer Inactive, interrupt disabled. */
}
PIT_0.MCR.R = 2; /* PIT clock disabled. */
SPC5_PIT_DISABLE_CLOCK(); /* stop the peripheral clock */
}
and call it just before to jump into your new program.
in our demo, it should be in updater_jump
just after stm_lld_stop
Best regards,
2022-12-12 12:30 AM
Hi ODOUV.1,
Thank you for the support.
It worked nicely.
Thanks,
Kasun
2022-12-12 12:47 AM
You are welcome dear Kasun !
Thank you, have a nice day.