STM32 UART #5 || Receive Data using IDLE Line || Interrupt || DMA

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 23

  • @andrefrol4107
    @andrefrol4107 9 หลายเดือนก่อน

    Best channel with cool tutorials!

  • @mahmutbucuk
    @mahmutbucuk 9 หลายเดือนก่อน

    Thanks for the new video. Is there a resource you would recommend to learn more ?

  • @kamilmeric5751
    @kamilmeric5751 9 หลายเดือนก่อน

    It is perfect and simple as always.... Good job...

  • @Demoland-xh4nh
    @Demoland-xh4nh 2 หลายเดือนก่อน

    Thank You for your tutorials

  • @alimamdouh6825
    @alimamdouh6825 9 หลายเดือนก่อน

    You are just an amazing man!! Thank you

  • @soaiku4636
    @soaiku4636 3 หลายเดือนก่อน

    Great thank you so much for sharing

  • @christiankoch4627
    @christiankoch4627 9 หลายเดือนก่อน +1

    It's time for Lin bus dude

  • @AmanSharma-z8z
    @AmanSharma-z8z 9 หลายเดือนก่อน

    Can you make the Video on how to configure the UART in DMA so that another UART Rx via Intrupt can trigger the UART DMA to transfer.

  • @DanielBazac
    @DanielBazac 8 หลายเดือนก่อน

    Is it possible to configure the timeout at which the controller considers an Idle event occurred?

  • @thanosprionas6919
    @thanosprionas6919 7 หลายเดือนก่อน

    I think that there is an issue on the latest example.
    Assumed that the last chunk is 250 bytes (DMA Size is 250) and the next one chunk is 32bytes (DMA Size is 282), the condition about Size == RX_SIZE(256) will not be executed.

  • @MrCaduru
    @MrCaduru 21 วันที่ผ่านมา

    How do we tell the DMA the size of the Rx buffer, in order to avoid overflow when sending a large file?

    • @ControllersTech
      @ControllersTech  21 วันที่ผ่านมา +1

      You can't. You should just define the buffer large enough.
      Or first send the data containing the size of RX buffer. Then use the data to define a new RX buffer and call dma function to receive the data.
      But this can't be done in a continuous data stream. After sending the buffer size, the sender must wait for some time so that the mcu gets enough time to create the buffer and call the dma receive function.

    • @MrCaduru
      @MrCaduru 20 วันที่ผ่านมา

      @@ControllersTech Thank you, I think my question was not clear enough. I was worried about a buffer overflow when too much data is sent. But I realized later that the dma will automatically loop in circular mode, and the size of the buffer is passed when calling ReceiveToIdle_DMA. Now I have been experimenting with this and it all works well, I am trying to optimize the delay between the Idle callback and the actual end of the message, which for some reason I can't get under 2us at 6MBaud. I suppose this is a hardware limitation. (Using the G431)

  • @sinarezaei218
    @sinarezaei218 9 หลายเดือนก่อน

    Great
    Thank you

  • @tuanfahrzeug
    @tuanfahrzeug 7 หลายเดือนก่อน

    super video, tks

  • @DanielBazac
    @DanielBazac 8 หลายเดือนก่อน

    How do you reset the index in the DMA buffer so that after each occurred Idle event the next received bytes are stored at the beginning of the buffer?

    • @ControllersTech
      @ControllersTech  8 หลายเดือนก่อน

      Why not use the interrupt for such case ?

    • @DanielBazac
      @DanielBazac 8 หลายเดือนก่อน

      I would like to use as little processing power as possible. Is it possible to store at the beginning of the buffer after each Idle event?

  • @AbdoMohamed-ue1rw
    @AbdoMohamed-ue1rw 8 หลายเดือนก่อน

    i can't found this function

  • @Ke3per88
    @Ke3per88 21 วันที่ผ่านมา

    Ive been messing around with an F401 Black pill, st-link to program it, and usb to ttl adapter to send data. I cannot for the life of me get it to do anything at all. Nothing happens. The program uploads fine. I have tried swapping the tx/rx pins around.

    • @ControllersTech
      @ControllersTech  21 วันที่ผ่านมา +1

      Did you try running a simple program to blink LED ?
      Maybe the clock configuration itself is wrong.

    • @Ke3per88
      @Ke3per88 20 วันที่ผ่านมา

      @@ControllersTech Yes that worked perfectly, provided the board was not in debug mode. Turns out I had just missed pressing "resume" and the code was waiting on HAL_init...
      Ive only just a few days ago received my first F4 board, no experience at all with CubeIDE, ive always had arduinos. Doh moment 🤣

    • @Ke3per88
      @Ke3per88 20 วันที่ผ่านมา

      @@ControllersTech Its all working now, next is trying to figure out how to setup an RxEventCallback from a specific uart.
      Can I change in
      // void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
      the *huart to &huart1/&huart2 or something, trying to make it listen on both uarts and whatever comes in forward over the opposite uart.