I have been struggling for the past several days trying to boot a TMS320C6720B using SPI slave boot mode. I can successfully get through the Start-Word Syncrhronization (SWS) and the PING opcode and exchange, but can get no further. The following exchanges are typical:
MCU sends 5853 and reads ffff (16-bit exchange),
MCU sends 5853 and reads 5253 (16-bit exchange; SWS complete),
MCU sends 5853590b and reads 52535253 (this and all remaining exchanges are 32-bit),
MCU sends 5853590b and reads 5253590b (PING exchange starts),
MCU sends 0000000a and reads 5253ffff (MCU sends PING count first time),
MCU sends 0000000a and reads ffff000a (MCU code strips off top 16 bits and calls this good; is this expected?)
MCU sends 00000001 and reads 0000000a,
MCU sends 00000001 and reads 00000001 (first PING value echoed properly),
MCU sends 00000002 and reads 00000001,
MCU sends 00000002 and reads 00000002 (second PING value echoed properly),
...
MCU sends 0000000a and reads 00000009,
MCU sends 0000000a and reads 0000000a (last PING value echoed properly, done with PING),
MCU sends 58535901 and reads 0000000a (MCU sends EnableCRC opcode, gets last PING value),
MCU sends 58535901 and reads 000a5901 (corrupted similar to PING count above; is this expected?),
MCU sends 58535901 and reads 5253ffff,
MCU sends 58535901 and reads ffffffff,
MCU sends 58535901 and reads ffffffff,
MCU sends 58535901 and reads ffffffff (this continues forever)
My questions:
1. Why is the PING count apparently echoed as 16 bits (ffff000a), not 32? Is this expected?
2. Why is the response to the 58535901 opcode only correct in the low 16 bits? Is this expected?
3. What did I do that started the endless ffffffff responses and how do I get out of it?
Note that I have performed the above exchanges from the MCU (an LPC2148) using both bit-banged SPI and hardware-implemented SPI with the same results. I have confirmed the above exchanges at the MCU's I/O pins using an oscilloscope. Every 32-bit exchange is sent as two 16-bit exchanges; MCU brings DSP's CS line high, then low (with suitable delay) between the two 16-bit exchanges. The MCU code used above was based on the example code from the TI SPRC203 folder (BootUtils).
Karl