AnsweredAssumed Answered

uart interrupt for receiving data in mqx 4.2

Question asked by annamol alex on Feb 2, 2016
Latest reply on Feb 5, 2016 by annamol alex


I am using TWR-K65F180M and IAR embedded workbench for ARM. I am trying to enable RX/TX interrupt in UART2 pins.For this the following changes were made

  • In user_config.h
    • #define BSPCFG_ENABLE_ITTYC 1
  • In twrk65f180m.h


          #ifndef BSP_DEFAULT_IO_CHANNEL

                   #if BSPCFG_ENABLE_ITTYC

                  #define BSP_DEFAULT_IO_CHANNEL                        "ittyc:"    /* OpenSDA-COM   polled mode   */

                  #define BSP_DEFAULT_IO_CHANNEL_DEFINED

  • After the changes, BSP, PSP were recompiled and built
  • In the application , I am opening ittyc and in IO_SERIAL_NON_BLOCKING and IO_SERIAL_RAW_IO
  • For receiving characters, I am waiting in a

               while(1)   {

                         if(fstatus(uart)) {

                         data= fgetc(uart);



I am having certain doubts regarding the working of the code,

  1. Is this how normally interrupt works for UART in MQX ? I saw many posts regarding UART interrupt for asynchronous messages. But everything is like this. I am not yet convinced that this is interrupt mode
  2. Is it ok to use a new ISR? (I read that if we map a new ISR we are overwriting and creating contention in MQX )
  3. All the data being transmitted from hyperterminal, I can see it on the screen itself. But I am not invoking any printf in my code. Even echo is also off. Any idea on why this happens
  4. What does fstatus() do?



Please do suggest the corrections that needs to be done in the code

Original Attachment has been moved to: