2016-12-30 01:20 PM
Hello there,
Is there any list of STM32 devices with native ModBus support? I am trying to find a proper mcu and I have to open each datasheet by hand and ctrl+F for modbus. There has to be a better way. So far I have figured out that only the newer devices have it (ie. F0 and F7). I need something in between with modbus support.
I would appreciate all help.
#stm32 #modbus2016-12-30 10:17 PM
How about STM32L476?
It's a mid range product based on Cortex M4 at 80MHz ~20mA
2016-12-30 11:05 PM
Hello
modbus is protocol and is not related to hardware .
Best regards.
2016-12-31 12:41 AM
Yes those seem to have enough power and native modbus features, thank you. They have some low power features however that I wont use and I will have to pay for (the chip is quite expensive). So do you think there is a list of devices?
2016-12-31 12:57 AM
2016-12-31 01:04 AM
2016-12-31 02:32 AM
Is there any list of STM32 devices with native ModBus support?
Yes, all STM32 devices have - Modbus RTU and ASCII are plain UART protocols, using RS232 (rarely) or RS485 (most common).
The rest is done in software, no really 'hardware tricks' required. Modbus ASCII is especially trivial to implement. RTU and it's timing requires some more brains.
Just get the specs from
or pull a free example stack.BTW, there is a Modbus TCP as well ...
2016-12-31 02:54 AM
It just generate Timeout nothing else.
2016-12-31 03:38 AM
Look guys I know modbus RTU can be implemented on anything really, but I am talking specifically about the hardware modbus support that the newer STM32 bit chips provide.
Here is the description from RM0091:
26.5.8 Modbus communication
The USART offers basic support for the implementation of Modbus/RTU and Modbus/ASCII
protocols. Modbus/RTU is a half duplex, block transfer protocol. The control part of theprotocol (address recognition, block integrity control and command interpretation) must beimplemented in software.The USART offers basic support for the end of the block detection, without softwareoverhead or other resources.Modbus/RTU
In this mode, the end of one block is recognized by a “silence� (idle line) for more than 2character times. This function is implemented through the programmable timeout function.The timeout function and interrupt must be activated, through the RTOEN bit in theUSARTx_CR2 register and the RTOIE in the USARTx_CR1 register. The valuecorresponding to a timeout of 2 character times (for example 22 x bit duration) must be programmed in the RTO register. when the receive line is idle for this duration, after the laststop bit is received, an interrupt is generated, informing the software that the current blockreception is completed.Modbus/ASCII
In this mode, the end of a block is recognized by a specific (CR/LF) character sequence.The USART manages this mechanism using the character match function.By programming the LF ASCII code in the ADD[7:0] field and by activating the charactermatch interrupt (CMIE=1), the software is informed when a LF has been received and cancheck the CR/LF in the DMA buffer.Thus I wanted to know either there is any list of devices that consist of this functionality.
2016-12-31 03:43 AM
These are futures may useful in modbus implementation from stm32f0 user manual
*Continuous communication using DMA
*Receiver timeout interrupt
*Received/transmitted bytes are buffered in reserved SRAM using centralized DMA
*Hardware flow control for modem and RS-485 transceiver