software update

Platform for Telematic Applications
Locked
robinguillaume
Posts: 13
Joined: Tue 5. Mar 2013, 13:52

software update

Post by robinguillaume » Mon 18. Mar 2013, 19:00

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.

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: software update

Post by S.Michaelsen » Tue 19. Mar 2013, 07:55

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

robinguillaume
Posts: 13
Joined: Tue 5. Mar 2013, 13:52

Re: software update

Post by robinguillaume » Tue 19. Mar 2013, 12:06

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.

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: software update

Post by S.Michaelsen » Tue 19. Mar 2013, 12:27

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

robinguillaume
Posts: 13
Joined: Tue 5. Mar 2013, 13:52

Re: software update

Post by robinguillaume » Tue 19. Mar 2013, 14:34

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.

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: software update

Post by S.Michaelsen » Wed 20. Mar 2013, 08:01

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

robinguillaume
Posts: 13
Joined: Tue 5. Mar 2013, 13:52

Re: software update

Post by robinguillaume » Wed 20. Mar 2013, 10:19

Hello,
thanks you, it's running.

Best Regards

S.Michaelsen
Hardware Development
Hardware Development
Posts: 73
Joined: Fri 10. Sep 2010, 13:11

Re: software update

Post by S.Michaelsen » Wed 20. Mar 2013, 10:29

You are welcome.

Best Regards,
Stephan Michaelsen

--- closed ---

Locked