does not work uart RX DMA after baudrate change from 9600 to 115200 during run mode
chip : stm32L433CCUX. source code is made by cubeMX automatically.
below my scenarios.
1.stm32l4 starts with uart baud rate 9600. and start with uart DMA.
2.communicate with other gps module by uart baud rate is 9600. for gps configuration
gps uart baud rate change is 115200.
3.stm32l4 uart baud rate is change 115200.
my problem is after uart baud rage changed with 115200. the uart DAM is not work.
i check the " the huart3.hdmarx->Instance->CNDTR" number.
if uart RX DMA is received data, huart3.hdmarx->Instance->CNDTR will be changed.
but no changed.
also, i set up circular mode with uart rx dma.
my code below
/* Initialize all configured peripherals */
// MX_GPIO_Init();
MX_DMA_Init();
MX_USART3_UART_Init(); // baud rate 9600
MX_I2C2_Init();
MX_USB_DEVICE_Init();
MX_RTC_Init();
/* USER CODE BEGIN 2 */
HAL_UART_Receive_DMA(&huart3,UART_Receive_data,sizeof(UART_Receive_data));
CLEAR_BIT(huart3.Instance->CR1, USART_CR1_PEIE);
CLEAR_BIT(huart3.Instance->CR3, USART_CR3_EIE);
void gpsConfiguration(void)
{
#if 1
for(int i=0;i<28;i++)
{
//HAL_UART_Transmit(&huart3,&BDrateHex115200[i],28,10);
HAL_UART_Transmit_DMA(&huart3,&BDrateHex115200[i],28);
}
HAL_Delay(1000);
huart3.Instance = USART3;
huart3.Init.BaudRate = 115200; //changed 115200
huart3.Init.WordLength = UART_WORDLENGTH_8B;
huart3.Init.StopBits = UART_STOPBITS_1;
huart3.Init.Parity = UART_PARITY_NONE;
huart3.Init.Mode = UART_MODE_TX_RX;
huart3.Init.HwFlowCtl = UART_HWCONTROL_NONE;
huart3.Init.OverSampling = UART_OVERSAMPLING_16;
huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;
if (HAL_UART_Init(&huart3) != HAL_OK)
{
_Error_Handler(__FILE__, __LINE__);
}
#endif
}