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 Anderson,I understand that SPI slave boot is not working for ADSP-21571. Is this correct? Can you please check the below and see if this could be of help.Can you please let me know how are you loading the .ldr file and sending it from the Host processor?Note that the SPI slave boot types do not need bit reversing necessarily. For SPI slave boots to non-PROM devices, the same default exists (bit-reversed); however, the host can simply be configured to transmit LSB first. Are you doing so?Please ensure that the correct boot kernel is used before generating the loader (.LDR) file. If you are using a modified boot kernel, try using the default boot kernel supplied with CCES together with a simple LED blink code to confirm basic boot-loading.Also, ensure that you have selected the correct parameters while generating the .LDR file. Selecting an inappropriate parameter may cause the boot to fail. Please choose the loader option (Boot mode (-b)) as ‘SPI slave’ for booting from the external host processor. Meanwhile I would suggest you to try booting a simple LED blink application and check if that boots correctly. BTW, is it possible for you to hook up the SPI signals from the host and check if the data is sent out correctly?Regards,Lalitha S
Hello Lalitha,Sorry for my late reply - I have been working on other projects for a while.You are correct; I can not get SPI Slave Boot to work for the ADSP-21571.Regard the SPI bit order; if I understand you correctly the DSP is expecting LSB first, right?That is what I'm no trying without any success (I have actually tried both bit orders without any success).To eliminate any problems I might have with the elfloader utility or my program I am now transmitting only three simple block headers:
1. First Block (hdrSign = 0xAC, targetAddr = 0x1c0000
2. Fill Block ( hdrSign = 0xAC, targetAddr = 0x1c0000, byteCount = 4, argument = 0xcafebabe)
3. Final Block (hdrSign = 0xAC, targetAddr = 0, byteCnt = 0, argument = 0)
I figure I should see 0xcafebabe showing up at address 0x1c0000 when using the CrossCore Memory Browser.Unfortunately data at address 0x1c0000 is not affected.
Is this expected?
I have attached an image of what the SPI signals look like. From top to bottom the signals are SPI2_SS, SPI2_CLK, SPI2_MOSI. Just ignore the fourth signal at the bottom.Regarding my software; as you also suggested, I have a tiny program that just toggles a GPIO pin. It works just fine when I'm running it from CrossCore.