Modbus Library without FreeRTOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 4:09 AM - last edited on ‎2024-09-24 4:28 AM by mƎALLEm
Hi,
I am working with an STM32 microcontroller (STM32 C0 & STM32H5 series) and want to implement Modbus communication without using FreeRTOS . Most examples I found are based on FreeRTOS, but I need to handle Modbus protocol in a non-RTOS environment.
Are there any recommended Modbus libraries that can work without an RTOS?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 4:36 AM - edited ‎2024-09-24 4:36 AM
Hello @himani ,
You need also to specify which Modbus flavor? RTU? TCP/IP?
Knowing that STM32C0 has no ETH interface.
See for example these links for Modbus RTU: https://github.com/urands/stModbus
https://github.com/cwalter-at/freemodbus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 4:36 AM - edited ‎2024-09-24 4:36 AM
Hello @himani ,
You need also to specify which Modbus flavor? RTU? TCP/IP?
Knowing that STM32C0 has no ETH interface.
See for example these links for Modbus RTU: https://github.com/urands/stModbus
https://github.com/cwalter-at/freemodbus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 5:02 AM - edited ‎2024-09-24 5:03 AM
Hi,
Yes you are right, I need ModbusSlave library for RTU without FreeRTOS .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-24 5:05 AM
Checkout the links I provided.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-25 4:48 AM
Modbus Serial is simple in the sense that the modbus master sends the commands and the addressed slave respond with the data. You have to study the modbus command response of the slave device(assuming that stm32 is the master). Otherwise stm32 as slave has to respond. It all depends on your slave device documentation. they would have given some sample command and response, Else generate a specific command response packet and try it . Ultimately it is send out through the UART and received though the same uart. If it is Rs485, you have to control the
DE/RE pin to put the module into TX or RX . Normally it is simplex communication. only one device is active at the same time.
