Page 1 of 1
software update
Posted: Mon 18. Mar 2013, 19:00
by robinguillaume
Hello
We use rs232 link to load new software versions.
We load crc.txt, FirmCrc.bin and update.ini with update = true.
can i re start the PCAN without stopping power neither using the instruction switchoff which needs the can bus to be off?
Regards.
Re: software update
Posted: Tue 19. Mar 2013, 07:55
by S.Michaelsen
Hello,
if I understood right you want to perform a reset of the hardware. You can use the function “void hardware_StartBootloader(void)” to do that.
Best Regards,
Stephan Michaelsen
Re: software update
Posted: Tue 19. Mar 2013, 12:06
by robinguillaume
i want to do an update of the program.
how can the update.ini (with update=true) be considered to do the update without stop and restart the power?
Regards.
Re: software update
Posted: Tue 19. Mar 2013, 12:27
by S.Michaelsen
You have to reset the GPRS-Link. Function from my last post. In this case the firmware should be updated independend from the value in the update.ini. If you want the update is only performed if the update.ini contains "UPDATE=TRUE" you can simply reset the module by using "void hardware_reset(void)" or use the registers of the watchdog.
Best Regards,
Stephan Michaelsen
Re: software update
Posted: Tue 19. Mar 2013, 14:34
by robinguillaume
i think I am missing something.
Nothing appends when i call hardware_StartBootloader() or hardware_reset().
for example, i test this fonction by receiving 'S' on the Uart3 to reset the PCAN(temp is the buffer where datas are received)
if (temp[0] == 'S'){
UART_write("BEFORE",6,UART3);
hardware_reset();
UART_write("AFTER",5,UART3);
}
i receive BEFORE and AFTER hardware_reset has no effect, the update.ini remains with TRUE, i don't receive the message i send when the program reboots.
Regards.
Re: software update
Posted: Wed 20. Mar 2013, 08:01
by S.Michaelsen
Hello,
the hardware reset function uses the watchdog to reset the controller so it only works if the wtchdog is enabled. If you don't use the watchdog please add the line "hardware_WatchdogInit(5);" bevore the "hardware_reset()".
Best Regards,
Stephan Michaelsen
Re: software update
Posted: Wed 20. Mar 2013, 10:19
by robinguillaume
Hello,
thanks you, it's running.
Best Regards
Re: software update
Posted: Wed 20. Mar 2013, 10:29
by S.Michaelsen
You are welcome.
Best Regards,
Stephan Michaelsen
--- closed ---