Skip to main content
Visitor II
January 14, 2024
Question

STM32F407 USB to UART

  • January 14, 2024
  • 3 replies
  • 2320 views

hello,
Im trying to send the data I received on USB port (succesfully) to the UART port 
i tried sending data between 2 windows in Hercule, one is connected to the USB port, the other is connected to the UART port with the right configurations. 
I provided the transmit and receive data in the code but it doesn't seem to work out. 

 

    This topic has been closed for replies.

    3 replies

    Graduate II
    January 15, 2024

    Fascinating, but lacking actual detail

    Would avoid using blocking UART functions, but rather buffer the data so you can feed out using IT / DMA independently of the USB interrupts/callbacks.

    Lola_Author
    Visitor II
    January 15, 2024

    exactly what I did

    Super User
    January 22, 2024

    @Lola_ wrote:

    exactly what I did


    Again, lacking in any detail.

     


    @Lola_ wrote:

    i tried sending data between 2 windows in Hercule


    What debugging have you done to find where it's going wrong? You need to exercise your little grey cells ...

    eg, from USB to UART:

    • did your USB code receive the data from Hercule?
    • Was that data correctly passed to your UART driver?

    Have you tested that the UART and USB parts of your code work separately?

    eg,

    • can you do a software loop-back with just the USB code?
    • can you do a software loop-back with just the UART code?

     

    Super User
    January 15, 2024

    As @Tesla DeLorean said: "but lacking actual detail"

    You SAY that you did this, but you don't show HOW you did it.  We can't help without more detail.  Post your relevant code (click the "..." button in the format bar the use the "</>" code tag).

    "doesn't seem to work out" - You need to be more specific.  How does it not work.  What do you see, and what don't you see?  Can you read data from the USB?  Send data out the UART?  etc.