Skip to content

Rust Modbus context example with stm32 (stm32f103c8t6) & RS485

License

Notifications You must be signed in to change notification settings

alttch/stm32f1-modbus-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Modbus context example with stm32 (stm32f103c8t6) & RS485

Very simple example of Modbus context on stm32 via RS485/RTU.

Hardware

  • stm32f103c8t6

  • UART TTL to RS485 (MAX485)

  • ST-LINK/V2 (for flashing)

  • any USB RS485 whistle (for testing from PC)

Wiring

Connection scheme

Software

Libraries

Flashing

cargo install cargo-flash # if not installed yed
cargo flash --chip stm32f103C8 --release

What can it do

Just the demo. You can read/write Modbus context with any Modbus/RTU client, get/set any Modbus registers.

Input registers 0 and 1 contain processed frame counter (big-endian u32).

Rmodbus used with "smallcontext" feature, so only registers 0-999 (all types) are accessible.

Enjoy!

About

Rust Modbus context example with stm32 (stm32f103c8t6) & RS485

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages