2008-02-01 07:23 AM
Flashloading through CAN port
2011-05-17 03:22 AM
I recently got a task to flash loading through CAN port.
I have some idea about flash loading using USART. I have also used ST AN2557 and example code to flash load with USART. In USART flash loading I used the HyperTerminal to send the binary file to STM32. But not sure which software utility should I use to send the file through CAN network. I already have a CAN adapter by Kvaser . It can send the packet but not the file. also not sure which protocol I need to implement for data integrity. if anybody has any experience with CAN please help me . Thanks Kim :-[2011-05-17 03:22 AM
Hi Kim,
I'm using CAN for program download and upload. We defined our own protocol since the protocols I know are quite inefficient for transfer of large data arrays. An experience we did that could help: CAN hardware detects lost frames and has built in CRC, therefore there is no need of additional software for error detection and correction. BUT: Since CAN is a message oriented bus system, in most applications the order of received frames is not important. We observed that some interface cards for PC sometimes swap CAN frames or even loses frames (or maybe windows does it?). Therefore you need error detection in software. I would use a frame counter for each frame, or transmit the address together with the data in each CAN-frame, e.g 32-bit data + correspondig 32-bit address = 8 bytes. Philipp2011-05-17 03:22 AM
Thanks Philipp for sharing your CAN expereience with us!!.
we are also thinking to define our own function code for flashloading.