Hi Oliver
I am sorry I just saw your post, I haven't checked back here in a long time.
The starting point is to build the MQX bsp for the serial port you are trying to use. You would make that change in the user_config.h file for the board/processor you are using. This is where it gets confusing in my estimation. The BSP files are built around a board concept usually a tower board. We have a custom board using a mk20dx256vll10 chip, we have to build the bsp for the twrk40x256. To me this is counter intuitive and took us a lot of time to resolve. I don't see a way to include my file so I will paste a portion here.
ITTYA enables the irq for UART.
Now I am going from memory of a few years ago here, but you also must modify one of the mqx source files and rebuild the BSP to get the driver to work and also setup your vector table. This was a long time ago. But if you look for my name, there was a question I asked and a person(woman) replied saying where/how to set up the files.
The uart driver is a driver with blocking and non blocking calls, so you do not have to do all the low level work with registers; however this is also a trap. Read carefully my posts and problems and Davids answers. This is a really dismal driver. You can not do any type of frame recognition without extensive coding. You have to set this up for your own timeout by polling if a first char is received in non blocking mode and then returning to check the timeout and delaying. If character is there you have to find a way to get all the characters if this is a string. There in lies the problem. Where is the end of the string? What happens if the string is broken, you can't just read the buffer, mqx will short change you or give you part of another buffer. All in all, it is not a good driver in my estimation.
*
* $FileName: user_config.h$
* $Version : 3.8.19.0$
* $Date : Sep-18-2012$
*
* Comments:
*
* User configuration for MQX components
*
*END**************************************************************************/
#ifndef __user_config_h__
#define __user_config_h__
/* mandatory CPU identification */
#define MQX_CPU PSP_CPU_MK40DX256Z
#define BSP_DEFAULT_IO_CHANNEL "ttyb:" // rwl, default printf
//#define BSP_DEFAULT_IO_CHANNEL "ittya:" // rwl, change so printf's not going on BT channel, ittya
//#define BSP_DEFAULT_IO_CHANNEL_DEFINED
//#define BSP_DEFAULT_IO_CHANNEL "iodebug:"
#define BSPCFG_ENABLE_IO_SUBSYSTEM 1
//#define BSPCFG_ENABLE_IODEBUG 1
#define BSPCFG_ENABLE_TTYA 0
#define BSPCFG_ENABLE_ITTYA 1
#define BSPCFG_SCI0_BAUD_RATE 9600
#define BSPCFG_SCI0_QUEUE_SIZE 128
#define BSPCFG_ENABLE_TTYB 1 // defined so printf goes here
#define BSPCFG_ENABLE_ITTYB 0
#define BSPCFG_ENABLE_TTYC 0
#define BSPCFG_ENABLE_ITTYC 0
#define BSPCFG_ENABLE_TTYD 0
#define BSPCFG_ENABLE_ITTYD 0
#define BSPCFG_ENABLE_TTYE 0
#define BSPCFG_ENABLE_ITTYE 0
#define BSPCFG_ENABLE_TTYF 0
#define BSPCFG_ENABLE_ITTYF 0
Robert