Skip to main content
Graduate
August 3, 2024
Solved

STM32F446VET7 LoRa E220-400T30S UART Communication

  • August 3, 2024
  • 2 replies
  • 1543 views

Hello,

I am trying write a LoRa library to STM32F446VET7 in my application.

In the LoRa E220-400T30S documentation, it tells me to set the UART settings for configuration mode to 9600 and 8N1 and to give 1 to M0 - M1 pins.

testbenchmark_0-1722677845691.png

After doing that I am trying an exampe in below of the document

testbenchmark_1-1722678016431.png

I am sending "C10004" and I have an interrupt for receive function for RX. But I got nothing in buffer...

testbenchmark_2-1722678063835.png

testbenchmark_3-1722678118028.png

testbenchmark_4-1722678157021.png

I'm using UART for the first time, so I can't even guess what I'm doing wrong. I would be very grateful if you can help me.

 

 

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    Send as three bytes not as an ASCII string

    2 replies

    Graduate II
    August 3, 2024

    Is the UART RX interrupt actually triggered? You will be able to check with debugger breakpoint or onboard LED.

    If interrupt is not triggered, check the NVIC configuration, likes HAL_NVIC_EnableIRQ().

     

    Make sure interrupt handler can call the HAL driver's callback. HAL_UART_RxCpltCallback function is executed by the UART interrupt handler:

     

    void USART1_IRQHandler(void)
    {
     HAL_UART_IRQHandler(&huart);
    }

     

    (examples are about USART1. You need to find an interrupt handler suitable for your hardware.)

     

    If the connection between hardware cannot be guaranteed, the loopback test will be helpful for diagnosis. Tie the TX pin and the RX pin and send any data. check the RX interrupt occurs and the RX data is the same as the TX data.

    Graduate II
    August 3, 2024

    Send as three bytes not as an ASCII string

    Graduate
    August 3, 2024

    I did it after posting this nothing changed still not working :(

    Send

    testbenchmark_0-1722683636923.png

    Receive

    testbenchmark_1-1722683664616.png