Skip to main content
Associate
March 18, 2025
Solved

Issue with UART/USB Rx interrupt in STM32F407VGT6 and using DP83848 LWIP stack.

  • March 18, 2025
  • 11 replies
  • 1139 views

Hello, Good morning all,

I am doing a project with STM32F407VGT6 and DP83848 Ethernet Controller using LWIP stack. My requirement is UART/USB to Ethernet. I have enabled global interrupt and IRQ Handlers for both USB & UART, but when I send data from UART/USB RX interrupt is not enabling by MCU. Please suggest me the solution to enable USB/UART interrupt for receiving data.

Thanks and regards

Satyanarayana 

This topic has been closed for replies.
Best answer by Satya_VVM

Hello @Saket_Om

Thanks a lot for your valued support, actually there was an hardware issue.

Thanks

Satyanarayana

 

11 replies

ST Technical Moderator
March 18, 2025

Hello @Satya_VVM 

Did you enable UART global interrupt in CubeMX side please?

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om
Satya_VVMAuthor
Associate
March 19, 2025

Hello @Saket_Om,

Yes, I have enabled global interrupts in .ioc configuration settings, I am receiving data from Ethernet to UART & USB, please find the screen shots for your reference.

Screenshot 2025-03-19 103202.png

Screenshot 2025-03-19 103139.png

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if (huart->Instance == USART1)
{
Uart_RX_flag =1;
Tcp_send_flag =1;
HAL_UART_Receive_IT(&huart1, (uint8_t *)Uart_RX_Buffer,strlen((char*)Uart_RX_Buffer));
if (huart->Instance == USART2)
{
Uart_RX_flag =1;
Tcp_send_flag =1;
HAL_UART_Receive_IT(&huart2, (uint8_t *)Uart_RX_Buffer,strlen((char*)Uart_RX_Buffer));
}
}

and also I called in main function for UART1_IRQHandler(); HAL_UART_RxCpltCallback(&huart1);.
The Uart RX interrupt is working normally without LWIP software. Please suggest me in solving the problem
Thanks & Regards
Satyanarayana.
 
ST Technical Moderator
March 19, 2025

@Satya_VVM wrote:
and also I called in main function for UART1_IRQHandler(); HAL_UART_RxCpltCallback(&huart1);
 

Could explain more please? If possible share the code.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Saket_Om