STM32 UART DMA rs232/485 for any STM32 series using STM32CubeIDE's HAL - STM32 Tutorial #10

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

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

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

    Great video! I'm surprised it hasn't gotten more reactions and likes.
    Your library is very useful! Thanks!
    I want to use your library for rs485 communication. Can you perhaps show me how I would implement Multiprocessor communication mode?

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

      For rs485 we have one master and multiple slave devices. Each slave device can have a unique address and only react if masters request contains this address. There is also a less known approach of assigning time slots. Each device on a 485 bus assigned a number; for example 1,2,3,4 for four devices. Each device transmits only during allowed time slot. for example, first device from 0 to 250ms, second from 250 to 500ms, third from 500 to 750ms and the fourth from 750ms to 1 second. Obviously with some margins. Device can broadcast any data with its number, so remaining devices can update their clock, so time slots do not overlap over time. Or even better: transmit empty packets all the time when there is no data. Back to the classical approach: we have some communication protocol, and each packet from the master contains the address. This means that slaves never send data on their own. And again we end up with poling slave devices one by one using their addresses.

    • @PieterPaulBaron
      @PieterPaulBaron 25 วันที่ผ่านมา

      @@TechSponsorTV Thanks I did not know about the timeslot approach. I managed to interface with some devices using your library. It works very well! I am now trying to interface with a RS-485 device. It UART in 9-Bit mode. Can you please tell if your library can be modified to handle that and what I would need to change?

    • @TechSponsorTV
      @TechSponsorTV  25 วันที่ผ่านมา

      @@PieterPaulBaron for rs485 need single gpio output connected to both de/re and change it during transmission. It should be in the library file already (commented out). I haven't worked with 9bit packets and community.st.com has some topic mentions that it's not so simple. I am not sure though, is there a 9-bit selector in cubemx? I never used it or parity settings, only default values

  • @jaybarnes5183
    @jaybarnes5183 ปีที่แล้ว +1

    Promo'SM 💐

    • @TechSponsorTV
      @TechSponsorTV  ปีที่แล้ว

      I will put more great videos soon!

  • @CLGilbert
    @CLGilbert 15 วันที่ผ่านมา

    That flying mouse is so distracting.

    • @TechSponsorTV
      @TechSponsorTV  14 วันที่ผ่านมา

      Thanks for your feedback! Please check PDF version:
      github.com/georgy-moshkin/stm32uart/blob/main/How-To-Use-STM32-UART-HAL-DMA.pdf
      or
      github.com/georgy-moshkin/stm32uart

  • @idopshik
    @idopshik 2 ชั่วโมงที่ผ่านมา

    Edited. Just wasted my time. Really disappointed about video an the whole approach.