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.

Starterware/AM3352: The speed to program SPI flash is too slow.

Part Number: AM3352

Tool/software: Starterware

Hi experts,

My board is based AM3352, a SPI flash is used to keep SPL/UBOOT image. I created a CCS project based the starterware to access the SPI flash, I was able to write/read flash for now, but the speed is too slow.

1) I'm using blackhawk, I found the maximum clock TCK of it can be like 10MHz.

2) The size of SPL and UBOOT Is like 500KB。

3) While I need like 50 minutes to write this 500KB data.

4) The speed of AM3352 in my GEL is 500MHz.

5) I don't use Interrupt in my project, as I found I couldn't enable Interrupt, I just read 16bytes each time from file, then write it to SPI interface, wait some times (a counter of 0x01FF to zero), then write another 16 bytes again.

6) I measured the timing, I found CCS will write these 16bytes every 1500ms, this should be the root cause, but I don't know how to reduce it.

Any comments?

Thanks

Chris

  • Chris,

    Have you tried the SPI flash writer tool in the PDK located at C:\ti\pdk_am335x_1_0_6\packages\ti\starterware\tools\flash_writer?
    Perhaps this will be faster.

    Lali
  • Hi Lali,

    Thanks for helping.

    I found the root cause. By default, CCS will only use L3OCMC0 for stack, data, const, etc. So both my code and the starterware tools are kind of the same, I didn't test the speed of flash_writer, but it should not be fast.

    I enabled DDR3 SDRAM in my GEL file, so I changed the bin file for SPL and UBOOT to header files fristly, then allocate .const .data, and others to DDR 3 SDRAM, loading the .out file is kind of slower a bit, maybe 20 seconds, but it only take maybe 30 seconds to program the flash, not 50 minutes as before.

    Thanks
    Chris