2021-06-21 05:37 AM
Is the below calls are required between every transmit and receive call, if we are using DMA?
if(HAL_UART_DeInit(&UartHandle) != HAL_OK)
{
Error_Handler();
}
if(HAL_UART_Init(&UartHandle) != HAL_OK)
{
Error_Handler();
}
Please give a clarification..
2021-06-21 06:38 AM
No, they are not.
2021-06-22 06:04 AM
Ok.
PFA code.
Do you know why i am not able to receive interrupt by using " HAL_UARTEx_ReceiveToIdle_DMA(&huart2, (uint8_t *) RxBuf, RxBuf_SIZE);"
Sometimes in RxBuf i got 'd' continuously(what i am transmittting).
Please let me know what i need to do to get RxBuf correctly.
Thanks,
Jestina
2021-06-22 06:29 AM
Could be many reasons. This would be my guess:
https://community.st.com/s/article/FAQ-DMA-is-not-working-on-STM32H7-devices
Consider starting with a known example that works and modify it from there:
2021-06-23 01:46 AM
Hi
Thanks for the response.
I am connecting a Modem to my STM32H7 board.
If i comment below lines
if(HAL_UART_Transmit(&huart2, (uint8_t *)"d" , 1,TX_TIMEOUT) != HAL_OK)
Error_Handler();
I am able to receive the log from my modem when i press the RESET key in modem.
What i am not getting is "Transmitting continuously character d from STM32 and pressing RESET, I am expecting some logs from Modem. But i am not able to receive any log. Its receiving only char d".
Normal case DMA receive is working. I made some MPU configurations as well.
What i need to know is why i am not receiving anything if i transmit continuously ...
Thanks,
Jestina