I'm trying to boot an ADSP-21571 using SPI Slave mode, but I just can't get it to work.I'm pretty sure I have configured my SPI Master correctly (msb-first, pos. clk polarity). At the moment I'm running at a very low rate (1MHz).
When analyzing the Boot Stream (as generated by the elfloader tool), I can not quite understand the value of Target Address field in the Block Headers.From what I understand, for a Normal Block, the Target Address should always be the byte address of where the payload should be loaded.However, all Target Address fields have $28 in the most-significant byte. The other 24 bits seem to represent the correct address, but multiplied with a factor 2,4, 12 etc compared to the address found in the generated map-file.
Could someone please shed some light on this?
By the way, are there any examples on how to boot an ADSP-.21571 in SPI Slave mode available?
Hi,One question regarding the SPICMD byte.
The Hardware Reference Manual says:"The SPI slave processor detects the correct boot mode from the host SPI device by reading the first byte sent, definedas SPICMD. The SPICMD Descriptions table describes the available codes. These additional bytes must besent prior to transmitting the data to configure the SPI device accordingly."Does that mean the SPICMD byte(s) is not part of the Boot Loader Stream as generated by the elfloader utility?
Finally solved it!
Found the solution over at the BlackFin part of this forum.See: https://ez.analog.com/dsp/blackfin-processors/bf70x/f/q-a/12886/bf70x-spi-slave-boot-loading-stalls-after-approx-80-bytes/162170#162170
You have to transmit an additional 0x03 before sending the Boot Loader Stream. I got confused by the fact that the first byte in the stream is also 0x03. I incorrectly mixed up bcode and SPICMD.
Thanks - and good luck, Matt.
An update.It seems that you'll have to pull SPI2_SS high, and then low again, between sending the initial 0x03 (SPICMD) and the loader stream data.Can't find that piece of info anywhere in the documentation...Thanks
Nice work! I'm able to boot the chip by first sending a single byte SPICMD (0x03) as you describe. Based on what I see, the elfloader tool puts the bCode value at the start of each block. This is not the SPICMD, as you determined. What is the bCode for in SPI Slave Mode? I don't know - maybe nothing.
ADI - please clarify the purpose of the bCode in SPI Slave mode. Please udgrade the documentation to better explain how SPI Slave boot mode is used!
In my project, I didn't find this necessary. Not sure why, as you know its not covered well at all in any documentation I've ever found. I did allow for a short wait after the SPICMD byte is sent, however. I'll probably work with it a bit more and maybe get a better sense of what's needed.
Also - I found that the SPI2_RDY signal doesn't seem to start working properly until after the first block has been sent. If I begin polling the SPI2_RDY signal right away it doesn't ever get driven low to indicate its safe to be sending data.