Roger Simpson

Using UART1 and UART2 on TWR MCF5225F

Discussion created by Roger Simpson on Jan 3, 2010
Latest reply on Jan 4, 2010 by Roger Simpson
I am attempting to follow the instructions in section 4.2 of the Freescale MQX RTOS 3.4.0 Release Notes in order to build a version of RTOS that in addition to the standard support of UART0 (which is used for shell communications) also supports UART1 and UART2. I want to be able to use UART1 and UART2 to communicate with some ham radio stuff at 9600baud, with 8 data bits, no parity, and stop bit with length 1.  The problem I am having is that the prototype user_config.h file in  c:\Program Files\Freescale\Freescale MQX 3.4\config\twrmcf52259\  only has #defines as follows for the "TTYA" as follows:  #define BSPCFG_ENABLE_TTYA 0 #define BSPCFG_ENABLE_ITTYA 0  My questions are:  1. What happened to the #defines for TTYB and TTYC as documented in section 4.2.1 of the release notes? I expected to see #defines such as this:  #define BSPCFG_ENABLE_TTYB 0 #define BSPCFG_ENABLE_TTYC 0  which would be the #defines that I would change from 0 to 1.  Can I go ahead and add these #defines to user_config.h based upon those that are in c:\Program Files\Freescale\Freescale MQX 3.4\mqx\source\bsp\twrmcf52259\twrmcf52259.h ? -->  #define BSPCFG_ENABLE_TTYB 1 #define BSPCFG_UART1_BAUD_RATE 9600  #define BSPCFG_ENABLE_TTYC 1 #define BSPCFG_UART2_BAUD_RATE 9600  2. Under the covers the shell is using UART0. Does the shell use UART0 by way of TTYA support or is it the case that the shell libraries talk to the UART hardware directly? Put another way -- in the sample LAB1 project are the entry point names for the for the calls to talk to UART0 (as a TTYA device) in the project as extern symbols so that user .c code can call these entry points and they will be resolved during link time?  3. Where are the user calls to use TTYA, TTYB, and TTYC support documented? I need documentation or sample code that shows how to open up a UART for a given baud rate, and number of data bits, etc. and then send and receive characters via the UART.