cancel
Showing results for 
Search instead for 
Did you mean: 

Flashloading through CAN port

smart
Associate II
Posted on February 01, 2008 at 16:23

Flashloading through CAN port

3 REPLIES 3
smart
Associate II
Posted on May 17, 2011 at 12:22

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

http://www.kvaser.com/index.htm

. 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

:-[

philipp2399
Associate II
Posted on May 17, 2011 at 12:22

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.

Philipp

smart
Associate II
Posted on May 17, 2011 at 12:22

Thanks Philipp for sharing your CAN expereience with us!!.

we are also thinking to define our own function code for flashloading.