XU216-512 SPI slave boot

If you have a simple question and just want an answer.
pgorny
New User
Posts: 2
Joined: Tue Nov 17, 2015 8:30 pm

XU216-512 SPI slave boot

Post by pgorny »

Hi,

how to generate a bin file to boot the device via SPI slave from RAM (not OTP)? Can I generate it from third-party supplied .xe file? How will this bin file differ from image read from QSPI flash programmed via xtag3 from the same .xe file?

Also, is this ok to tie the spi boot SCLK and MOSI with other SPI  respective pins (X1D37, X1D38) and use two distinctive SS? Will it afect the boot sequence or SPI usage during program execution? Maybe it's advised to use the same SPI for boot and normal operation as a slave?

Is SS active positive (as name suggests) or negative (like it's stated in some XMOS guides or SPI timing diagrams)?

Przemek

User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

What the image to supply to your SPI master "programmer" will look like depends on how it will feed the image out to the xCORE, if it will do any bit reversing or nibble swapping.

 

What's saved in QSPI flash is a program image, nibble swapped with a size word added before it and CRC checksum added after it.

 

Let's take a 4-byte image for example, 5C A1 AB 1E. Contents of flash will be 10 00 00 00 C5 1A BA E1 XX XX XX XX, where XX is checksum.

pgorny
New User
Posts: 2
Joined: Tue Nov 17, 2015 8:30 pm

Post by pgorny »

Code: Select all

Yes, of course. I will use a microcontroller and what I understand from XU256-512 datasheet I need to feed in the image lsbfirst. So no nibble swapping.
Regarding your example I don't understand the meaning of size word 10 00 00 00. Can you explain it further? The rest is very informative.

Is there a documented method of creating pure .bin image directly in xtime ide or from .xe file? It's pain to program the flash and read it afterwards only to get the image. 

Also there's no info if the image clocked in to SPI slave should have any of these additional info like size or CRC. I'm really struggling to get it done...