UART communication with MQX driver fails

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

UART communication with MQX driver fails

ソリューションへジャンプ
930件の閲覧回数
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 件の賞賛
1 解決策
482件の閲覧回数
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 件の賞賛
3 返答(返信)
482件の閲覧回数
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 件の賞賛
483件の閲覧回数
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 件の賞賛
482件の閲覧回数
soli
Contributor I

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

 

0 件の賞賛