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.
解決済! 解決策の投稿を見る。
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
Can you send your program (basic init, send, recw data) to me ? I use it only for education and to understand uart.
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
Thank you Mark. You point me to the right mistake.