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.

Programming 24-bit SPI Flash on a custom C5515 board.

Other Parts Discussed in Thread: TMS320C5515

Hi,

We are experiencing problems with loading our code inot a 32Mbit Serial Flash Memory. Actually there seem to be several versions of the programmer.out utility and I am not sure which one to use to program a 24-bit SPI compatible Serial Flash chip.

The programmer.out when loaded and executed (available on the Spectrum Digital site for their C5515EVM) :

Be sure to set the system PLL to 12.288MHz
Choose the device...
1x - NAND Flash [CSx: 2,3,4,5]
     4 is for TMS320C5515 EVM
2x - NOR Flash [CSx: 2,3,4,5]
     2 is for TMS320C5515 EVM
3x - SPI EEPROM [PinMap x: 1=EVM]
4 - IIC EEPROM
5 - MMC;  6 - SD
7x - SPI Flash [PinMap x: 1=EVM]
Not Applicable to TMS320C5515 EVM
This is for 24-bit Address EEPROM or flash memory

then choosing 71 it returns with :

71
SPI Flash...
ERROR: Invalid programming choice

Otherwise if I chose option 31 as with our previous VC5505, 64Kbytes EEPROM board I get :

Be sure to set the system PLL to 12.288MHz
Choose the device...
1x - NAND Flash [CSx: 2,3,4,5]
     4 is for TMS320C5515 EVM
2x - NOR Flash [CSx: 2,3,4,5]
     2 is for TMS320C5515 EVM
3x - SPI EEPROM [PinMap x: 1=EVM]
4 - IIC EEPROM
5 - MMC;  6 - SD
7x - SPI Flash [PinMap x: 1=EVM]
Not Applicable to TMS320C5515 EVM
This is for 24-bit Address EEPROM or flash memory
31
Operation to perform...
0 - CPLD setup for this device
1<file> - Program device with <file>
2<file> - Read device data to output <file>
1c:\file.bin
SPI EEPROM...
Writing data to device...
Opening c:\file.bin...
Input file opened
WRITE ERROR! at 0x00000000
Wrote 0x09aa  Read 0x0fff

We have a custom board that we built ourselves an as such is not an EVM board from Spectrum Digital, so I am not sure if this version of programmer.out I got from Spec Dig is the correct one to use. However I read somewhere there was a programmer.pjt to compile. Where is this available or is only the .bin file available ??

This is unfortunately the first time we are using the C5515 with a 24-bit SPI compatible Flash so we are not sure how to proceed as there is not much documentation on programming 24-bit serial Flash on the TI site. Any suggestions would be greatly appreciated.


Regards, M

  • The bulk of the documentation for programming should reside in the data sheet for the specific 24-bit SPI Flash chip that you are using.  The Flash documentation will tell you what SPI commands are needed to erase and write data.  Some Flash chips have very bizarre modes such as pages that are larger than 256 bytes (e.g. 264 bytes), special high-speed write commands, or serial numbers.

    You should find plenty of documentation from Texas Instruments on how the SPI port works, and how you might set compatible mode bits to facilitate communication with your Flash by matching the two specifications.  Basically, you need to compare the data sheets from both chips (DSP & Flash) and find the commonalities.

  • Hi Brian,


    I did find a bin file that seems to do the job, but somewhat difficult to find. The particular SPI flash we are using is 100% SPI compatible and with the programmer.out we now use, and the program is loaded without any problems. Basically it all works as before when we were using the 512Kbit EEPROM with the VC5505. The extra addressing space for the SPI flash is really welcomed !!

    One thing though, I'd love to add some lines of source code that are specific to our custom modules so as to facilitate the flashing of the bin code. Unfortunately there does not seem to exist a source code for the programmer.out that we now use, that could be adapted to one's needs - but mind you, there are plenty of different versions of programmer.out. so somebody out there must have a fairly recent version of the source code of this little program - programmer.out ??

    I never used any Spect. Dig. eval boards and in any case the SPI flash we use does NOT work with the Spect Dig version of the programmer.out software that was suggested on this blog ... our requirements were a little different.

     

    Cheers, M


  • I wrote my own Flash erase+write code based on the data sheets.  You should be able to do the same without the programmer.out source, provided you have an in-house firmware developer.  Unfortunately, the code that I wrote is not freely available, as it was written for a client.  It's not that tough: You just send and receive bytes over SPI just like the Flash data sheet documents.

  • Brian Willoughby said:

    I wrote my own Flash erase+write code based on the data sheets.  You should be able to do the same without the programmer.out source, provided you have an in-house firmware developer.  Unfortunately, the code that I wrote is not freely available, as it was written for a client.  It's not that tough: You just send and receive bytes over SPI just like the Flash data sheet documents.

     

    Hi Brian,

    Sounds good ! Good on you ! I'll look into that solution if there is no other ... unfortunately our developers are too busy with protocols, real-time firmware development and testing & validation of the application's code. We could not justify the time to do it at this point in time. Forgive my presumptions but it was natural to expect that the same (or equivalent) software would exist for the C5515. But yes, your right, I totally agree, its always better to create your own IP and use it in your own products, than to just give it away to a client (no matter how charming he/she may be). It turns out that what I wanted to do is possible with a simple GEL script that can be executed after the programmer.out terminates - so all is cool even without the source ...

    Cheers & good luck,

    M