This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Startup.s

Hi all,

I am using uVision3 to program my STR710 MCU in C langue. For evaluation purpose I am running from SRAM. In the uVision-project there is a file named: Startup.s.

In this file the basic settings of the STR710 to operate are done. In this file also all the interrupts are initialised.

I have all the IRQ's handlers working. Also the 2 FIQ's I have working.

The problem is that I do not get the Reset, Undefined, PAbt and DAbt handlers working.

I have written the handler functions in my program but they are not entered. In my C program I have the folowing handler:

void Undef_Handler (void) __irq
{
RCCU->CCR |= 0x808; // Program counter corrupted jump to unknown memory location , system reset
RCCU->SMR |= 0x02;

}

I am trying to test the handler this way.

During debug I can change the PC(PC $ option in register window during debugging)in uVision.(am I allowed to?) I set it to 0x40020000(flash). On this location there are only 0xFFFFFFFF filled registers.
With the MCU processing 0xFFFFFFFF an undefined exception should find place. The program should enter the Undef_handler, but it does not. The program just crashes.

Does someone know how the handle the Reset, Undefined, PAbt and DAbt handlers in a C progam?

Regards,

Erik

0