2021-10-09 05:45 AM
i want to build continuous potentiometer with dma which is sensing wind direction .
I have to use modbus because send data on an another STM32F070F6P6 microcontroller, but in the reference manual pdf(page 22) it says we can't work modbus communication with usart, is this true? Can anyone help me about modbus and spi ?
Solved! Go to Solution.
2021-10-10 03:14 AM
The automatic direction control ("Drive Enable") is present, so the only modbus-specific feature missing is idle detection (for RTU) and CR detection (for ASCII).
I would use interrupt-driven implemetation, and there the idle can be detected by (re-)starting a timer whenever a character is received and having a timer interrupt after the required IDLE time; CR detection in the receiver interrupt is trivial.
JW
2021-10-09 08:08 AM
That's Datasheet. Reference Manual is https://www.st.com/resource/en/reference_manual/rm0360-stm32f030x4x6x8xc-and-stm32f070x6xb-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
> it says we can't work modbus communication with usart
No, it says that the USART does not have the features which make Modbus implementation easier (automatic direction control, IDLE detection). It does not mean that Modbus is impossible to be implemented, just it's inconvenient and you would need to have a deeper understanding of the controls.
JW
2021-10-09 11:33 AM
2021-10-10 03:14 AM
The automatic direction control ("Drive Enable") is present, so the only modbus-specific feature missing is idle detection (for RTU) and CR detection (for ASCII).
I would use interrupt-driven implemetation, and there the idle can be detected by (re-)starting a timer whenever a character is received and having a timer interrupt after the required IDLE time; CR detection in the receiver interrupt is trivial.
JW