This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AWR1642: How to flash the sflash without UNIFLASH under the ARM/Linux system?

Part Number: AWR1642
Other Parts Discussed in Thread: UNIFLASH

Tool/software: Linux

Hi,

I'm trying to flash the device (flash through UART with the AWR1642) under the ARM with Linux system. I have finished a simple code, which can program the RAM. But about the flash, it becomes a different story.

The document I reference is <AWR1642 Bootloader Flow>, or <SWRA551>. 

---------------

Each time I send the <Write to Flash Command> (data payload <8 bytes without 0x24), the ACK returns perfect.

If I set the (data payload >7 bytes), saying (data payload =8 bytes), there is no ACK feedback at all. However, if I just change the 0x24 to 0x26 (with new checksum), the ACK will return correctly. I tested with the flash file(.bin, 300+ kBytes), it can uploaded 250 x 8 bytes successfully, but return 0x00 0x04 0x33 0x00 0x33 at the 9th block of 250 bytes data. 

The flow chart I'm using is the <Figure 13, Flashing Sequence> in SWRA551.pdf

---------------

The document mentions that during the "Writing to SFLASH, Compute CRC per packet". This document hasn't mention how to compute the CRC32, and how to appended the CRC32 to he packet.

What I need to know is:

With the CRC32, any data need to be changed or not? (command length, checksum).

Which part of the data do I need to calculate?(Payload only, begin from the 0xAA, the checksum, or from the 0x24?)

Which algorithm should I use to get the CRC32 (more than one standard to get it, also maybe the result will be different)?

The max packet size is 256, so what will be the max size of the payload in this case? How to append it to the command?

-------------------

The document hasn't mention how to get the checksum (I got it from other commands)

The document hasn't mention how to get the length (I got it from other commands)

The document hasn't mention what other ACKs will be except the 0x00 0x04 0xcc 0x00 0xcc.

The document hasn't mention how to erase the flash (no flow chart). Not sure it is critical to sflash-writing or not.

--------------------

I will appreciate if a C example can be provided; the UNIFLASH source code will be perfect. 

Sincerely,

King