How to use USART2 instead of USART1 in BLE_p2pServer example?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2025-01-22 2:36 AM
Hi @STTwo-32 ,
I am using the BLE_p2pServer example with NUCLEO-WBA55 and want to use USART2 instead of USART1. If I use USART1 and send a byte via HTerm, the task UTIL_SEQ_SetTask( 1<<CFG_TASK_SEND_NOTIF_ID, CFG_SEQ_PRIO_0); should be executed as soon as an RxCpltCallback event (in file usart_if.c) is triggered.
static void UsartIf_RxCpltCallback(UART_HandleTypeDef *huart)
{
/* USER CODE BEGIN UsartIf_RxCpltCallback 1 */
UTIL_SEQ_SetTask( 1<<CFG_TASK_SEND_NOTIF_ID, CFG_SEQ_PRIO_0);
/* USER CODE END UsartIf_RxCpltCallback 1 */
RxCpltCallback(&charRx, 1, 0);
HAL_UART_Receive_IT(&huart1, &charRx, 1);
/* USER CODE BEGIN UsartIf_RxCpltCallback 2 */
/* USER CODE END UsartIf_RxCpltCallback 2 */
}
When I establish a BLE connection with the ānRF Connectā app, I receive the corresponding notification (Same effect as when I press button1)
and I also receive the corresponding logs via HTerm.
But if I now change āserial links for logsā to USART2 and configure USART2 exactly the same as USART1, I get confused characters as log information like this:
- Labels:
-
STM32WBA series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2025-01-22 3:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
ā2025-03-05 2:35 AM
Hi,
Can you try activating Hardware Flow Control (RS232) CTS + RTS?
This can be done via MX in the UART config.
Let me know if you still have this behavior, please.
BR, JoƩ
