UART communication with MQX driver fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART communication with MQX driver fails

Jump to solution
1,120 Views
soli
Contributor I

Hello,

 

I use MQX with the UART_0 for default output. So the bsp is configured with:

#define BSPCFG_ENABLE_TTYA              1

//…

#if BSPCFG_ENABLE_TTYA

#define BSP_DEFAULT_IO_CHANNEL                    "ttya:"    /* OSJTAG-COM   polled mode   */

#define BSP_DEFAULT_IO_CHANNEL_DEFINED

 

 

In my application the uart driver opens without error messages and I can step with debug mode into the uart sending functions. In the kernel function “_kuart_polled_putc(KUART_INFO_STRUCT_PTR io_info_ptr, char c)” I stop an read out the memory and register settings.

 

In this example (have a look at the screenshot) I try to send the value 0x78 (stored in char c) to uart output. But after step over the code line number 607 the register “sci_ptr->D” (UARTDataRegister) does not change and still stay on value 0x00. A forced writing of another value by a JTAG-debugger does not change too. The Register never change but the kernel function returns like everything was fine. The hardware never change his output-signal.

 

Does anyone know why the uart will not send any character? And does anyone know why I cannot overwrite this register by JTAG-debugger (J-Link Ultra)?

 

By the way: My measured pin on hardware is the right pin (pin PTA14). I tested this by using the gpio-driver. I have the same problem if I use another uart device.

 

Thanks for help.

 

0 Kudos
Reply
1 Solution
672 Views
MarkP_
Contributor V

Hi,

uart output pins are initialized in init_gpio.c: _bsp_serial_io_init().

In MQX3.8 Uart device 0 (TTTYA) uses pins PTD6 and PTD7 pins, not PTA14.

~Mark

 

View solution in original post

0 Kudos
Reply
3 Replies
672 Views
kysel
Contributor I

Can you send your program (basic init, send, recw data) to me ? I use it only for education and to understand uart.

0 Kudos
Reply
673 Views
MarkP_
Contributor V

Hi,

uart output pins are initialized in init_gpio.c: _bsp_serial_io_init().

In MQX3.8 Uart device 0 (TTTYA) uses pins PTD6 and PTD7 pins, not PTA14.

~Mark

 

0 Kudos
Reply
672 Views
soli
Contributor I

Thank you Mark. You point me to the right mistake.

 

0 Kudos
Reply