Questions about 9-bit RS485 Multiprocessor Mode and HAL.
I am working on a project which is an upgrade of an existing project. The existing project was done with an Atmel processor, the current upgrade is based on an STM32F767. The project involves, among other things, multiple serial busses communicating with multiple devices. I used STM32CubeMx to develop drivers for all the ports, and all of them but one is running. However, unknown to me until today was that one of the ports is using what Atmel called "multidrop",which is what I remember from projects a long time ago as "UART 9-bits protocol", where the 9th bit is used as an address bit, so that writing to a specific device can be done by addressing it, and after addressing the address bit is lowered, and data is sent 9 bits with the MSbit as 0 only bothering the addressed device.
First, It is unclear from the documentation if this is what is meant by "Multiprocessor Mode". If so, two things are unclear from the HAL functions. The first is how to generate the address bit in a frame of data. The second is that STM32CubeMX, when entering Multiprocessor Mode, removes the hardware controlled DXEN, which means I have to handle the DXEN as a GPIO if I want to work my 485 Transceiver.
The only way that I can see to handle this right now is manually - define the UART as a standard Asynchronous 9-bit no-parity UART, with the DXEN hardware controlled, and send my data at 16 (9) bit data, like this
0x01rr 0x00tt 0x00tt...
where rr is the address, and the tt's are the data, and on the receive end to stop ignoring data bytes after receiving 0x01mm (mm = my address), taking the 8 LSbits of the data that comes in after that as mine, until another 0x01xx (= some other address) comes.
Am I correct in understanding that what the Multiprocessor mode is giving me is not what I require? And also correct in my understanding that there is no other mode existing which handles this other than what I am showing above?
