I published a book which discusses this very topic on Amazon: https://www.amazon.com/dp/B086PNZF4W"Tutorial on Modbus RTU Slave Design: How to Design Modbus Slave Device Firmware in C"
I published a book on this very topic on Amazon: https://www.amazon.com/dp/B086PNZF4W"Tutorial on Modbus RTU Slave Design: How to Design Modbus Slave Device Firmware in C"