cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L416KBU6 will not execute HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

MNapi
Senior II

I have tried simple code

* USER CODE BEGIN 0 */

uint8_t myTx[13] ="hello world\r\n";;

uint8_t myRx[13] ="hello world\r\n";

main();

* USER CODE BEGIN 2 */

HAL_UART_Receive_DMA(&huart2, myRx,13);

while()

{

//nothing here

{

/* USER CODE BEGIN 4 */

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

{

 UNUSED(huart);

  HAL_UART_Transmit(&huart2, myTx, 13, 10);

}

/* USER CODE END 4 */

but it can transmit if I put the code in while() loop

I do have setup DMA (circular) and global interrupt in Cube MX

I TRIED THE SAME CODE ON STM32f446RE it works fine . I am using RealTerm as serial monitor which works fine on other boards.

also when I setup clock in CUbe MX for STM32L416KBU6 50 Mhz I get in keil

RCC_OscInitStruct.PLL.PLLN = 25;

shouldn't I have

RCC_OscInitStruct.PLL.PLLN = 50;

it is always half the value

0 REPLIES 0