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.

AM3358: PRU Initialization Failing when Booting From SPI

Part Number: AM3358

I have a custom board with an OSD3358. If I load the exact same binary via JTAG or UART, the PRU initializes fine, but when loading from SPI, the PRU initialization fails while everything else initializes fine. When looking at the PRU registers, everything appears normal but when it doesn't work, the STALL counter starts shooting up. However, if I boot from SPI then set a break point just before the final enable for PRU0 and single-step through the assembly code, all of a sudden, it works. I've tried adding in delays and cache flushes to no avail. It's open source and bare metal; the top-level PRU init code is here: hal/hw_pru.c and the low-level init here: hal/hw_init.c.

I'm stumped and this genuinely feels like a bug that shouldn't happen. I do not know what, if anything, is being initialized between the SPI and the UART in the ROM boot sequence, but right now, that's my best guess, and that since I have the boot pins configured to boot SPI first, something's not getting initialized later on. Though, that doesn't really explain why debugging the SPI version would fix it either.

Help!