2019-04-18 05:44 AM
Question regarding an implementation of RS485 on an STM32.
The application note (reference guide) refers to 4 bits stored in the USART_CR2 register which can be used as an address comparison to aid with waking only when required.
“Address mark detection (WAKE=1)
In this mode, bytes are recognized as addresses if their MSB is a ‘1 else they are considered as data. In an address byte, the address of the targeted receiver is put on the 4 LSB. This 4-bit word is compared by the receiver with its own address which is programmed in the ADD bits in the USART_CR2 register.�?
But this limits the number of devices to 15 (plus a master) and the RS485 standard can handle 32 connections and the address is sent as a full byte (so theoretically 255 connected devices)
So; is this a handy device they’ve provided if you only want a few connected devices or am I missing something more?
Solved! Go to Solution.
2019-04-18 06:36 AM
Which part are you using? In STM32L0x1 USART_CR2 has 8 address bits - ADD[7:4] and ADD[3:0], and 4-bit or 7-bit address mark detection are supported.
2019-04-18 06:36 AM
Which part are you using? In STM32L0x1 USART_CR2 has 8 address bits - ADD[7:4] and ADD[3:0], and 4-bit or 7-bit address mark detection are supported.
2019-04-18 06:42 AM
STM32F091 (Nucleo-64)
Looking again I had the F4 Reference Manual.
Thanks for confiming it is fine in the F0.