Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modbusRTU with STM32L4 #359

Open
Rumen33 opened this issue Jul 22, 2024 · 0 comments
Open

modbusRTU with STM32L4 #359

Rumen33 opened this issue Jul 22, 2024 · 0 comments

Comments

@Rumen33
Copy link

Rumen33 commented Jul 22, 2024

I am trying to use the modbus RTU library with STM32L431RTC6 processor and it looks like the pulse on the direction pin of the processor is not long enough to achieve successful data transmission. I am using v. 4.1.0 of the library, but I also tried 4.1.1, without solving the problem. The processor is running at 16MHz clock freq. Data transmission speed is 9600 bps. The code was also tested with ESP32 and works great there.

I succeed to solve the problem by adding the following into ModbusSettings.h:

#if defined(ARDUINO_GENERIC_L431RCTX)
#define MODBUSRTU_FLUSH_DELAY 20
#endif

Is this a correct solution? Any support will be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant