AnsweredAssumed Answered

RS485 9-bit mode with DMA

Question asked by Awais Belal on Oct 21, 2014
Latest reply on Oct 22, 2014 by igorpadykov


We are trying to implement RS485 9-bit mode as discussed in IMX6SDLRM (Rev. 1, 04/2013). We have a RS485 transceiver connected to the uart5 of the board and things seem to work okay in normal transfers. However, when we try to switch to DMA mode, the controller seems to drop the address byte although a Slave Address Detected interrupt is raised. We are using a 3.10.45 kernel based on the 3.10.17 kernels from the Freescale GA branch  git:// branch imx_3.10.17_1.0.0_ga as well as Boundary Devices GA merge branch branch boundary-imx_3.10.17_1.0.0_ga-merge.


The programming sequence is as follows:


Enable RS485 9-bit mode:

ucr2 |= (UCR2_IRTS | UCR2_PREN | UCR2_WS);

ucr2 &= ~(UCR2_CTS | UCR2_CTSC);



Send data using DMA:

umcr |= TXB8;

transmit address byte using normal transfer, make sure the byte is transmitted before moving forward.

umcr &= ~TXB8;

write data using DMA


Data reception:

No changes



if (sts & USR1_SAD)

    writel(USR1_SAD, sport->port.membase + USR1);


Hope I've provided enough information, kindly let me know if any more details are required.