cancel
Showing results for 
Search instead for 
Did you mean: 

Bluetooth module HC-05

PMato.1
Associate II

I'm using STM32f411re to communicate with phone using HC-05 Bluetooth module, I want to turn an LED on, but this doesn't work when using UART2 but works well when using UART1, What could be the reason behind that?

1 REPLY 1

You don't say what board you are using, so I'll give two answers:

1) you're on a board that you designed, so either your layout to UART2 isn't working properly, you didn't change the handle for the HAL_UART* calls from huart1 to huart2, or something else.

2) if you're using a NUCLEO-F411RE board, UART2 is connected to the debug section to provide a virtual com port connection to the 411. If you have wired your HC-05 to the same pins (PA2/3), you'll have two RX pins connected together (one on the debug module and another on the HC-05), and you'll have two TX pins connected together which may be fatal if one is high and one is low simultaneously, likely letting out the magic smoke.

 

A