hello ,it's about the problem about UART ISR
I used to compile environment is KDS3.0
Using a KSDK1.2 and MQX4.2,and my board is frdmk64f
I want to rec data form uart with ISR
but when I install the uart0 isr,
the Interrupt handler is constantly triggered, whatever I have to send or receive data from UART0
I don't know what's the problem
Is it because UART0 is the default input port?
In addition, I want to know why the code “printf("\ncounter = %d\n", g_isr_data.COUNTER);”
could output data to uart0
void new_isr(void *user_isr_ptr)
{
MY_ISR_STRUCT_PTR isr_ptr;
isr_ptr = (MY_ISR_STRUCT_PTR)user_isr_ptr;
isr_ptr->COUNTER++;
/* It is common to chain interrupts */
/* isr_ptr->OLD_ISR(isr_ptr->OLD_ISR_DATA); */
}
main_task(){
INT_SYS_EnableIRQ(SW_IRQ);
/** Demonstration of mqx interrupt installation. Works with vector table placed in RW as well as RO memory **/
g_isr_data.COUNTER = 0;
g_isr_data.OLD_ISR_DATA = _int_get_isr_data(SW_IRQ);
g_isr_data.OLD_ISR = _int_get_isr(SW_IRQ);
/* Install MQX isr routine. This function does not change vector table */
old_isr = _int_install_isr(SW_IRQ, new_isr, &g_isr_data);
}