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

install dara abort ISR

Hello again,

I'm working with the AT91RM9200 controller. How is it possible to get a printf() message over the usart1 if a dara abort or undefined instruction has occured?

I've one .c file with all ISR; for example:

void AT91F_DataAbort()
{
        printf("Data Abort detected\n");
        while (1);
}

and the void AT91F_LowLevelInit() function.

But which changes I have to made in the startup code file to run this function is a data abort occured?

IS it something like that (I've found in the www)

IMPORT AT91F_LowLevelInit

                                ldr r1, = AT91_SVC_Stack_Begin
                                bic r1, r1, #3 ; Insure word alignement
                                mov sp, r1 ; Init stack SYS

                                ldr r0, = AT91F_LowLevelInit
                                mov lr, pc
                                bx r0


; Setup Stack for each mode

                LDR     R0, =Stack_Top

Maybe someone of you could give me a example, where I could see the changes in the startup code.

best regards
Johannes

Parents Reply Children
  • The "best" solution "may" be to have some variables that survives a reboot. Let the data abort exception record the most important register information (where and why). Then perform a reset and restart the application.

    If you do have any data that survives a reset, your main() app can then check if it was a normal reset, or the result of a data abort. In case of a data abort, you may log info to a serial port, write down a note to flash file system, ... before resuming the normal operation.

    If your app isn't controlling a nuclear facility, and you get on average one data abort/year, you might possibly ignore it. If you get too many in relation to your reliability requirements, you may retrieve information from your unit(s) and hunt down what is wrong.

    One of the problems you have, is that you don't know how stable your processor is when it reaches the data abort exception. A sprintf() buffer overflow may have made all *printf() completely unreliable.