cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F411 UART Connection to BLE

AM6789
Associate

After creating my own STM32 PCB, which functions in the same manner as the WeAct BlackPill Development Board (utilizing the STM32F411CEU6), I found myself unable to connect to an external BLE board through UART. I utilized the same pins (Gnd, 3.3V, PA9, PA10) for the pin-out connection, and added nothing else. Is there a reason why I cant read or send anything using the same code from before? Any ideas would be very helpful.

This is the code we are currently using: 

while (1) {

/* USER CODE END WHILE /

HAL_ADC_Start(&hadc1);

HAL_ADC_PollForConversion(&hadc1,10);

val = HAL_ADC_GetValue(&hadc1);

char buffer[20] = {'\0'}; //sprintf(out,"%d\r\n",val);

sprintf(buffer,"%d\r\n",val); //CDC_Transmit_FS((uint8_t)buffer,20);

HAL_UART_Transmit(&huart2,(uint8_t )buffer,sizeof(buffer),10);

/ USER CODE BEGIN 3 */ }

1 REPLY 1

Blinking a LED works?

In debugger, read out and check/post content of UART and relevant GPIO registers.

Observe UART Tx pin using oscilloscope/logic analyzer (LA).

Use a different type of UART connection, e.g. using a UART/USB convertor/cable connected to PC.

JW