alejoseb / Modbus-STM32-HAL-FreeRTOS

Modbus TCP and RTU, Master and Slave for STM32 using Cube HAL and FreeRTOS
GNU Lesser General Public License v2.1
579 stars 192 forks source link

Modbus RTU By using USART DMA #36

Closed Korka16 closed 3 years ago

Korka16 commented 3 years ago

Hello I am using the Modbus-STM32-HAL-FreeRTOS library that you made. I am testing the part using DMA. I am using stm32 L462VETx board as MCU and RS485_Click module. But I have a problem with the frame that I send. When I decode the frame on the oscilloscope the function code is found at the ID (so it creates a frame shift) as you can see in this Screenshot image Please can you help me. Thanks

alejoseb commented 3 years ago

Hi, I am not sure what is the tool that you are using, but the ID is usually an 8 bit value not a 16bit value as you show in that picture, eventually you need to configure your tool two work with 8bit for ID. You should also first test your port with USART without DMA to verify that the library is working on you MCU.