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.

AM2432: Question regarding Fault Handler and Interrupt Number

Part Number: AM2432

I am working on the fault handler for the AM2432's R5F core, is there a reference design that I could refer to?  I could not find the interrupt number reference page, which would list the interrupt number for abort. Could you please help to point to the correct document and page for this information?  

  • Hi Hong,

    is there a reference design that I could refer to?

    I'm unaware of any reference design.

    Please see: https://developer.arm.com/documentation/den0042/a/Exceptions-and-Interrupts

    For FreeRTOS

    • the vector table is defined in: <SDK>/source/kernel/freertos/dpl/r5/HwiP_armv7r_vectors_freertos_asm.S
    • exception and interrupts handlers are defined in: <SDK>/source/kernel/freertos/dpl/r5/HwiP_armv7r_handlers_freertos.c

    For No-RTOS

    • the vector table is defined in: <SDK>/source/kernel/nortos/dpl/r5/HwiP_armv7r_vectors_nortos_asm.S
    • exception and interrupts handlers are defined in: <SDK>/source/kernel/nortos/dpl/r5/HwiP_armv7r_handlers_nortos.c

    Notice the SDK has "hooks" for handling different kinds of exceptions, i.e. some of the handler functions are just spinning in place. Code can be added to these functions to implement exception handling.

    void __attribute__((interrupt("UNDEF"), section(".text.hwi"))) HwiP_undefined_handler(void)
    {
        volatile uint32_t loop = 1;
        while(loop)
            ;
    }

    Regards,
    Frank

  • Hello Frank,

    Thanks a lot for the information. 

    If we would like to have customized HwiP_armv7r_handlers_freertos.c, does it mean that we need to re-compile our own nortos.am243x.r5f.ti-arm-clang.debug.lib?

    Hong 

  • Hi Hong,

    Adding to the the information I shared previously:

    For FreeRTOS

    • the vector table is defined in: <SDK>/source/kernel/freertos/dpl/r5/HwiP_armv7r_vectors_freertos_asm.S
    • exception and interrupts handlers are defined in: <SDK>/source/kernel/freertos/dpl/r5/HwiP_armv7r_handlers_freertos.c
    • HwiP_armv7r_handlers_freertos.c is included these libraries, so these are the libraries to rebuild:
      • Debug build: freertos.am243x.r5f.ti-arm-clang.debug.lib
      • Release build: freertos.am243x.r5f.ti-arm-clang.release.lib

    For No-RTOS

    • the vector table is defined in: <SDK>/source/kernel/nortos/dpl/r5/HwiP_armv7r_vectors_nortos_asm.S
    • exception and interrupts handlers are defined in: <SDK>/source/kernel/nortos/dpl/r5/HwiP_armv7r_handlers_nortos.c
    • HwiP_armv7r_handlers_nortos.c is included in these libraries, so these are the libraries to rebuild:
      • Debug build: nortos.am243x.r5f.ti-arm-clang.debug.lib
      • Release build: nortos.am243x.r5f.ti-arm-clang.release.lib

    Regards,
    Frank

  • Thanks a lot, Frank. I will play around with this. 

    Hong