Hi Rudy:
I would suggest you refer to function _int_unexpected_isr (mqx/source/psp/cortex_m/int_unx.c)
I hope it helps.
void _int_unexpected_isr
(
void *parameter
)
{ /* Body */
KERNEL_DATA_STRUCT_PTR kernel_data;
TD_STRUCT_PTR td_ptr;
_GET_KERNEL_DATA(kernel_data);
td_ptr = kernel_data->ACTIVE_PTR;
#if 0
#if !MQX_LITE_VERSION_NUMBER
{
uint32_t psp, msp, i;
printf("\n\r*** UNHANDLED INTERRUPT ***\n\r");
printf("Vector #: 0x%02x Task Id: 0x%0x Td_ptr 0x%x\n\r",
(uint32_t)parameter, (uint32_t)td_ptr->TASK_ID, (uint32_t)td_ptr);
psp = __get_PSP();
msp = __get_MSP();
printf("PC: 0x%08x LR: 0x%08x PSP: 0x%08x MSP: 0x%08x PSR: 0x%08x\n\r", __get_PC(), __get_LR(), psp, msp, __get_PSR());
printf("\n\r\n\rMemory dump:\n\r");
for (i = 0; i < 32; i += 4) {
printf("0x%08x : 0x%08x 0x%08x 0x%08x 0x%08x\n\r", psp + i * 4, ((uint32_t*)psp)[i], ((uint32_t*)psp)[i + 1], ((uint32_t*)psp)[i + 2], ((uint32_t*)psp)[i + 3]);
}
printf("\n\r\n\rMemory dump:\n\r");
for (i = 0; i < 32; i += 4) {
printf("0x%08x : 0x%08x 0x%08x 0x%08x 0x%08x\n\r", msp + i * 4, ((uint32_t*)msp)[i], ((uint32_t*)msp)[i + 1], ((uint32_t*)msp)[i + 2], ((uint32_t*)msp)[i + 3]);
}
}
#endif
#endif
_INT_DISABLE();
if (td_ptr->STATE != UNHANDLED_INT_BLOCKED) {
td_ptr->STATE = UNHANDLED_INT_BLOCKED;
td_ptr->INFO = (_mqx_uint)parameter;
_QUEUE_UNLINK(td_ptr);
} /* Endif */
_INT_ENABLE();
Have a great day,
Daniel
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------