AnsweredAssumed Answered

TWR-K65F180 with MQX: why cannot I use UART0 and UART3? The system crashes

Question asked by Drugo Drughi on Jan 28, 2016
Latest reply on Mar 11, 2016 by Drugo Drughi

Dear community, please I need to ask an explanation for a weird issue I'm having using the "lwip_udpecho_demo" example (under c:\Freescale\KSDK_1.3.0\examples\twrk65f180m\demo_apps\lwip\lwip_udpecho_demo\udpecho_rtos). But, in my opinion, the issue is not due to the SPECIFIC demo example I am using. I guess it's use to MQX RTOS.

Unfortunately my deadline will be this incoming Monday. If I don't fix this issue I cannot deliver my project... :-(

 

ENVIRONMENT I AM USING

- KSDK 1.3.0

- TWR-K65F180 with TWR-SER2

- MQX RTOS

- PEMicro

- Either openSDA or Jlink for debugging

- PC console: either DB9 on TWR-SER2 or openSDA

- GNU-GCC Compiler

 

DESCRIPTION OF THE ISSUE

"lwip_udpecho_demo" code example uses UART2 to display debug strings on the PC-console. I need to make this TWR board communicate with another TWR-K65F180 with TWR-SER2 over UART. So I tried to use, in vain, either UART0 or UART3 (from, respectively, J7 pins 1 and 3 of TWR-SER2 and R40 (PT17) and R39 (PT16) of TWR-K65F180 board. The issue I'm having is that, when my code tries to transmit over UART0 (or UART3) using "UART_DRV_SendDataBlocking(0, bufferData, byteCountBuff, 1000u)", it always crashes inside this function (more precisely, when this function calls "retVal = UART_DRV_StartSendData(instance, txBuff, txSize)").

 

MY ANALYSIS OF THE ISSUE

I also tried to transmit data over UART0 and UART3 (same boards configuration) with the example "uart_blocking" present in the driver examples of the KSDK 1.3.0 folder. In this case I had not problem in term of that, everything worked perfectly! So, since this "uart_blocking" example is not using any RTOS, my guess is that MQX, for some reasons, keeps busy both UART0 and UART3 making my code crashing.  But, in the code, I didn't find the point when MQX opens these two ports.

 

Can this be the right explanation? But, more important, how can I use these two UARTs (0 and 3) using MQX RTOS in my code?

 

 

Thanks so much to all people who are going to help me

Outcomes