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.

MSP432P401R: MSP432 Default Interrupt Handler (IRQHandler)

Part Number: MSP432P401R

When using DriverLib or the lightweight NoRTOS provided in the MSP432P401R SDK, I have been able to interrupt service routines (ISRs) without manually poking my ISR into the vector table by using the default IRQHandler name. For example, if I use the name "TA0_N_IRQHandler " for my TImer0 ISR, I don't have to modify the vector table by hand:

extern void TA0_N_IRQHandler (void) __attribute__((weak,alias("Default_Handler")));

In a new project, I'm converting my code to FreeRTOS and it appears that my ISRs are failing to run. Instead, I find my code stuck in the "defaultISR" handler.

Is the weak, aliased IRQHandler supported on TI's FreeRTOS port? I hope so, this was a really handy!

Thanks,
Scott

  • Is the weak, aliased IRQHandler supported on TI's FreeRTOS port?

    Looking at the vibrationCapture.c example shows the HwiP_create() function being used to install an ISR for FreeRTOS, rather than the ISR being poked directly into the vector table.

    Where HwiP_create is part of simplelink_msp432p4_sdk_3_40_01_02/kernel/freertos/dpl/HwiPMSP432_freertos.c. HwiPMSP432_freertos.c contains the HwiP_dispatch() function which is registered as the actual function in the vector table, and HwiP_dispatch() then calls the function registered via HwiP_create().

    HwiP_dispatch() has support for FreeRTOS scheduling, e.g. calls taskYIELD() after the registered interrupt handler to force a context switch.

    If a FreeRTOS application directly pokes ISRs into the vector table bypassing the HwiP interrupt dispatcher not sure what problems it could create.

    In SYS/BIOS, interrupt handlers directly poked into the vector table were termed "zero latency" interrupts and had restrictions on which SYS/BIOS APIs  they could call. See https://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_76_04_02/exports/bios_6_76_04_02/docs/cdoc/ti/sysbios/family/arm/m3/Hwi.html#xdoc-desc for the SYS/BIOS documentation. I can't find the equivalent documentation for the FreeRTOS port.