Hi:
It is atated in SPRABD7, page 2 that the bootloader is always invoked after reset. Is this true for both hardware and software (asm(" RESET") resets?
Thanks a lot.
Cheers,
Mushtaq
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.
Hi:
It is atated in SPRABD7, page 2 that the bootloader is always invoked after reset. Is this true for both hardware and software (asm(" RESET") resets?
Thanks a lot.
Cheers,
Mushtaq
Hi Mushtaq,
The hardware reset will always invoke the bootloader but software reset typically does not invoke the bootloader, although it can be configured to do so.
See 2.8.1 Interrupt Vector Pointers (IVPD, IVPH) on page 62 of the C55x v3.x CPU Reference Guide
Reset (hardware or software) is just an interrupt to the DSP, and when any interrupt is encountered, the DSP reads the Interrupt vector pointers (IVPD, IVPH) to find the address of the appropriate ISR for that interrupt. IVPD points to the 256-byte program page for interrupt vectors 0–15 and 24–31. IVPH points to the 256-byte program page for interrupt vectors 16–23. Reset is interrupt vector 0 (non maskable, highest priority).
During a hardware reset, the IVPD and IVPH registers are reset to 0xFFFF, which after translation points to location 0xFFFF00 in ROM for the interrupt vectors used by the bootloader. Reading from this vector table, the DSP locates the beginning of the bootloader code and begins executing. Note that this vector table is filled with pointers to a dummy ISR for all other interrupts except reset, so if you want to use interrupts in your bootloaded program you will have to point the interrupt vector pointers (IVPD, IVPH) to another vector table in memory with function pointers to the appropriate ISRs.
On the other hand, a software reset does not modify the IVPD and IVPH registers, so if you change the interrupt vector pointers to point to another vector table then you are in control of where the DSP finds the reset ISR. It could return to the bootloader, or some other reset ISR. See 5.5 DSP Reset on page 137 of the C55x v3.x CPU Reference Guidefor a complete list of registers and DSP settings not modified during a software reset.
In our CSL examples, whenever an interrupt is enabled, the IVPD and IVPH registers are set to 0x0001, where there is a vector for each of the 32 possible ISRs including a reset interrupt that does not return to the bootloader.
Hope this helps,
Mark
Hi Mark:
Thanks a lot!
If prior to a software reset I set IVPD and IVPH to 0xFFFF, then on a software reset the ROM bootloader would be invoked. Is this correct?
Thanks again,
Cheers,
Mushtaq
Hi Mushtaq,
I have just verified that if you set IVPD and IVPH to 0xFFFF prior to a software reset on C5515, then the ROM bootloader is invoked.
Just remember this important note from the C55x v3.x CPU Reference Guide:
Before you modify the IVPs, make sure that:
* Maskable interrupts are globally disabled (INTM = 1). This prevents a maskable interrupt from occurring before the IVPs are modified to point to
new vectors.
* Each hardware nonmaskable interrupt has a vector and an interrupt service routine for the old IVPD value and for the new IVPD value. This
prevents fetching of an illegal instruction code if a hardware nonmaskable interrupt occurs during the process of modifying the IVPD.
Hope this helps,
Mark
Hi Mark:
Thanks a lot! That really helps! That's what I was observing with the C5502.
Thanks again.
Cheers,
Mushtaq
Hi,
I got a similar problem on a C5505 platform. I first use IVPIRQ_setVecs(0xFFFFFFFF); to configure the IVPD, IVPH and then call a soft reset (asm(" RESET;")). However, The DSP does not reboot. I also use IRQ_plug(0, (IRQ_IsrPtr)0xFF8000) to change the DSP boot address, but it still does not get reset. I wonder whether any DSP register or hardware is not configured properly before the reset command is called.
Regards
Jacob