Hi, I use RTOS Threadx and into the folder Threadx\threadx-6.4.1_rel\ports\cortex_m7\gnu the file readme_threadx.txt report about manged interrupts
A ThreadX managed interrupt is defined below. By following these conventions, the
application ISR is then allowed access to various ThreadX services from the ISR.
Here is the standard template for managed ISRs in ThreadX:
.global __tx_IntHandler
.thumb_func
__tx_IntHandler:
; VOID InterruptHandler (VOID)
; {
PUSH {r0, lr}
; /* Do interrupt handler work here */
; /* BL <your interrupt routine in C> */
POP {r0, lr}
BX lr
; }
Note: the Cortex-M requires exception handlers to be thumb labels, this implies bit 0 set.
To accomplish this, the declaration of the label has to be preceded by the assembler directive
.thumb_func to instruct the linker to create thumb labels. The label __tx_IntHandler needs to
be inserted in the correct location in the interrupt vector table. This table is typically
located in either your runtime startup file or in the tx_initialize_low_level.S file.
but in every example MCUXpresso project or like "driver\fsl_lpuart.c" file the ISR function it's written in C will take the form (where "your_C_isr" is an entry in the vector table):
void your_C_isr(void)
{
/* ISR processing goes here, including any needed function calls. */
SDK_ISR_EXIT_BARRIER;
}
so I'd like to understand witch is the correct way to write ISR function Threadx or MCUXpresso ?
bye