Hi Angelo,
I suspect that one of the following software configurations in the BSP is wrong:
Enable the #define BSPCFG_ENABLE_TTYA in user_config.h to 1.
In twrk60f120m.h setup Default IO to use ttya as follows:
#ifndef BSP_DEFAULT_IO_CHANNEL
#if BSPCFG_ENABLE_TTYA <--HERE
#define BSP_DEFAULT_IO_CHANNEL "ttya:" <--HERE //DES was "ttyf:" /* OSJTAG-COM polled mode */
#define BSP_DEFAULT_IO_CHANNEL_DEFINED
#else
#define BSP_DEFAULT_IO_CHANNEL NULL
#endif
#else
Change the PCR settings for UART0 from PTA1/2 to PTA14/15 AND fix the MUX setting in init_gpio.c as follows:
/* Setup GPIO for UART devices */
switch (dev_num)
{
case 0:
pctl = (PORT_MemMapPtr)PORTA_BASE_PTR;
if (flags & IO_PERIPHERAL_PIN_MUX_ENABLE)
{
#if 1 //DES 1=test for using PTA14/15 as alternate UART interface for TWR-K60F120M, 0=default code
/* PTA1 as RX function (Alt.3) + drive strength */
pctl->PCR[15] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
/* PTA2 as TX function (Alt.3) + drive strength */
pctl->PCR[14] = 0 | PORT_PCR_MUX(3) | PORT_PCR_DSE_MASK;
#else
/* PTA1 as RX function (Alt.3) + drive strength */
pctl->PCR[1] = 0 | PORT_PCR_MUX(2) | PORT_PCR_DSE_MASK;
/* PTA2 as TX function (Alt.3) + drive strength */
pctl->PCR[2] = 0 | PORT_PCR_MUX(2) | PORT_PCR_DSE_MASK;
#endif
}
Re-compile the RTOS and MQX Application.
My hardware setup.
I just used my MQX4.1.1TWR-K60F120MTWR-SER card.
On TWR-SER card remove jumpers J17 and J19 (but record how they were configured so you can restore the setting: Default on 1-2 pins).
I installed jumper wire from TWR-K60F120M J23 pin 1 to TWR-SER J19 pin 1. This PTA14 UART0_TX.
I installed jumper wire from TWR-K60F120M B15 Primary riser side to TWR-SER J17 pin 1. This PTA15 UART0_RX.
I ran a modified hello world example so I could test both TX and RX signal paths.
Regards,
David