In order to be able to implement a firmware-upgrade system, I'm trying to get the DSP to reboot and reload the application firmware from SPI NOR flash. From what I've gathered, writing the SRST bit in SYSCTL should do just that.
However, the core never seems to be able to come out of reset. There is no activity on the SPI bus.
Please see the code snippet below. I've tried several things, such as resetting the SPI peripheral, and putting the PLL in bypass. None of those methods seem to help. I've also added the reset code to the start of the program, as recommended in a different discussion here.
Please note that performing a hard-reset does work.
Is there something that I'm forgetting?
// Reset SPI registers.
// PMCTL register is not reset during a software reset. Make sure the SPI is on so we can boot.
*pPMCTL1 &= ~SPIOFF;
// Put PLL in bypass mode.
*pPMCTL |= PLLBP; // Should NOT be done in the same clock cycle as setting the multiplier.
//Wait for around 4096 cycles for the pll to lock.
for (i = 0; i < 4096; i++)
*pSYSCTL = SRST; // Soft reset
Similar kind of issue is discussed by me in the engineer zone already, can you please look into the below thread.
In the same thread you can find…
I've identified and fixed the issue that was causing the processor to not leave reset. That was actually the watchdog, which only gets disabled upon hardware reset, not software reset. Kicking the…
In the same thread you can find an example code for 'software reset', which can be directly run on the ADSP-21479 EZ Kit. Please make this example code as a reference and let me know if you are still facing any problem.
Yes, I've referred to that and have made sure to reset the SPI registers, both before and after boot as first instructions in the main program.
I do not have an emulator connected.
I've identified and fixed the issue that was causing the processor to not leave reset. That was actually the watchdog, which only gets disabled upon hardware reset, not software reset. Kicking the watchdog just before reset, and during booting of the kernel does the trick.
Glad to know that the problem is fixed. Thanks for your update.
How do you solve this problem? can you share your code to me? I am meeting the same problem too now. very thanks.