Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Wi-Fi Combo Forum Discussions

JoDr_3827906
Level 1
Level 1
First like received

We are trying to use two UARTs on a STM32F412ZG.  Only the UART connected to STDIO_UART works.  Each works when connected to STDIO_UART, so the hardware works.  We think we have programmed the second UART the same as STDIO_UART.

Is wiced_uart_transmit_bytes thread safe?

What could be the problems?

1 Solution
RaktimR_11
Moderator
Moderator
Moderator
500 likes received 250 likes received 100 likes received

wiced_uart_transmit_bytes is thread safe. If you check the underlying implementation, a semaphore is in place to handle the tx_complete event ensuring the thread safety.

I am just making a blind guess here regarding your problem.Please correct me if my understanding is completely incorrect. Only STDIO_UART is connected through the FTDI chip in HW which is usually UART_1 and used for debug prints. I would recommend you to probe the UART_2 lines in your HW, which is USART2 in STM32F412 if you are using the platform definition provided in WICED and see if you can check the data transfer.

View solution in original post

3 Replies
RaktimR_11
Moderator
Moderator
Moderator
500 likes received 250 likes received 100 likes received

wiced_uart_transmit_bytes is thread safe. If you check the underlying implementation, a semaphore is in place to handle the tx_complete event ensuring the thread safety.

I am just making a blind guess here regarding your problem.Please correct me if my understanding is completely incorrect. Only STDIO_UART is connected through the FTDI chip in HW which is usually UART_1 and used for debug prints. I would recommend you to probe the UART_2 lines in your HW, which is USART2 in STM32F412 if you are using the platform definition provided in WICED and see if you can check the data transfer.

Both UARTs are connected to the outside world.  STDIO is UART3 and the second is UART6.  We are using custom hardware.  Whenever I try to transmi on UART6, I lose UART3 as in I can't type commands on my debug port attached to STDIO.

It is a firmware issue.  Somehow I am not setting up the second thread or am not processing the transmit correctly.  Not sure where to look at this point...

0 Likes

You can try to debug this issue further if you check the UART lines using a Logic Analyzer maybe (if you have not already tried that). In that case, you can at least rule out the possibility of firmware issue. The next step would be individually transmitting and receiving through both of the UART ports and if that is successful, that means the implementation wise there is something wrong; Hope this helps you to further narrow down the issue.

0 Likes