AnsweredAssumed Answered

about MQX interrupt uart

Question asked by HAOYUAN CAI on Apr 14, 2015
Latest reply on Apr 22, 2015 by Radek Sestak

Hey ,every one I find a problem about interrupt uart in MQX .I use K60 microcontroller.

 

Now I can receive data from ISR. but when I send bytes to Computer. I just receive one byte in Computer. even if I send one byte follow one byte .I also just can receive only the first byte. Someone can help me?

 

After I install my uart ISR . I can not disable it . I have try use _int_disable(); But it does not work.

 

Below is my code:

 

void world_task
   (
      uint_32 initial_data
   )
{
  
   MY_ISR_STRUCT_PTR  uart_isr_ptr;
    unsigned char return1s;

   _task_id hello_task_id;
   upload_dev  = fopen( "ittyd:", BSP_DEFAULT_IO_OPEN_MODE );  //BSP_DEFAULT_IO_OPEN_MODE  IO_SERIAL_RAW_IO
       uint_32 baud=9600;

  
  // _kuart_int_enable();
return1s = _bsp_serial_io_init(3, (IO_PERIPHERAL_PIN_MUX_ENABLE|IO_PERIPHERAL_CLOCK_ENABLE));
if(return1s == MQX_OK)
{
   printf("OK");

}

   _int_install_isr(INT_UART3_RX_TX,UART4_RX_ISR,upload_dev);

   _task_block();

}


/* EOF */
uint32_t g_UART_ISR_buffer[40]; //

void UART4_RX_ISR( pointer user_isr_ptr)
{
    unsigned char Redata;              
    int itemp;                  
    UART_MemMapPtr  sci_ptr = UART3_BASE_PTR; 

 

    if ((sci_ptr->S1 & UART_S1_RDRF_MASK)==0) goto UART4_RX_ISR_End;

 


       Redata    = sci_ptr->D;    //?????????
 
if(CreateFrame(Redata)!=0) 
{
   //_lwevent_set(&lwevent_group,Event_UART4_ReData);
}
    UART4_RX_ISR_End: ;
}

Outcomes