QN9090-UART_1 not sending any Tx data

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

QN9090-UART_1 not sending any Tx data

Jump to solution
735 Views
blas_m
Contributor III

Hello there,

I am using the BLE example design "private_profile_server" and I would like to add a UART communication to the design.
After removing the default pins configuration for the UART_1 on (pins11-10) and the SPIF (pins17-21) , I set-up the pins for the UART_1 at pins 19-20

Then I use as UART example designs , two options:
- A)  UART_0 set-up on the same "private_profile_server" example design. This uses the Serial Manager Interface functions
-  B)  UART_0 set-up on  "usart_interrupt" example design. This uses the UART Drivers functions

Inside BleAppInit(), I initialize the UART_1 using option A) Serial Manager Interface functions:
Following the  Serial Manager Interface functions, and changing their parameters to the UART_1 like:
Serial_InitInterface(&gImp_UARTMsg, gSerialMgrUart_c, DEBUG_SERIAL_INTERFACE_INSTANCE);
Serial_SetBaudRate(gImp_UARTMsg, gUARTBaudRate115200_c);
Serial_Print(gAppSerMgrIf, "\r\nBleApp_Init(), UART_1 initialization value: ", gNoBlock_d);
Serial_PrintDec(gAppSerMgrIf, report_UART_1);

I would be expecting to get reported the same value than it does for the DEBUG_UART @ UART_0, this is '0':
BleApp_Init(), App UART initialized: 0
However, the Serial Manager reports that can not deal with 2 UARTs at the same time!!
BleApp_Init(), IMP UART initialization value: 3  ( gSerial_MaxInterfacesReached_c = 3)

As a second chance, inside BleAppInit(), I initialize the UART_1 using option B) UART drivers functions:
Following the UART Driver functions defined in the "uart_interrupt" example design and changing their parameters to the UART_1 like:

USART_GetDefaultConfig(&configImpUART);
configImpUART.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE;
configImpUART.enableTx     = true;
configImpUART.enableRx     = true;
 
status_t uart_status = USART_Init(IMP_USART, &configImpUART, DEMO_USART_CLK_FREQ);
Serial_Print(gAppSerMgrIf, "\r\nIMP_Init_UART(), IMP UART initialization value: ", gNoBlock_d);
Serial_PrintDec(gAppSerMgrIf, uart_status);
 
/* Send g_tipString out. */
USART_WriteBlocking(IMP_USART, g_MsgString, (sizeof(g_MsgString) / sizeof(g_MsgString[0])) - 1);

 

The USART_Init() returns an status of the initialization process, which this time is as expected, '0':
BleApp_Init(), App UART initialized: 0
IMP_Init_UART(), IMP UART initialization value: 0 (Great I though!!)

But when the next command sends a string to be printed in the UART_1 port, my COM terminal does not print out anything.

I have checked the UART adapter on the Debug port where I can see the same message than at the MCUXpresso IDE
Attached the provate_profile-server.c file I am using for your review

Any ideas why: 
Serial Manager Interface functions,  do not allow more than 1 UART to be managed?
UART Drivers functions seem to set-up UART_1 correctly but no message is being send via Tx port/pin?

 

0 Kudos
Reply
1 Solution
707 Views
blas_m
Contributor III

I found out the problem was due to the HW pin initialization not being applied.
After updating the pins via the MCUXpresso 'Config Tool' using my own Pins Group = PinsFunc_1, the function created by the tools with the new pins configuration needs to be called on the SW App code.

blas_m_0-1683882098800.png

Calling the additional UART pins configuration on the code

blas_m_1-1683882225345.png

 

 

View solution in original post

0 Kudos
Reply
1 Reply
708 Views
blas_m
Contributor III

I found out the problem was due to the HW pin initialization not being applied.
After updating the pins via the MCUXpresso 'Config Tool' using my own Pins Group = PinsFunc_1, the function created by the tools with the new pins configuration needs to be called on the SW App code.

blas_m_0-1683882098800.png

Calling the additional UART pins configuration on the code

blas_m_1-1683882225345.png

 

 

0 Kudos
Reply