MDB/ICP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MDB/ICP

3,016 次查看
alessandrobiasc
Contributor I

Dear all,

                              we have an iMX6ULL processor and we would like to support Multi-Drop Bus / Internal Communication Protocol (MDB/ICP) of vending machines. ( http://moodle.lyceestendhal.it/pluginfile.php/1104/mod_resource/content/1/logiciel%20MDB.pdf ).

In the architecture of the network the iMX6ULL board is the master of the BUS. The protocol is a multi-drop protocol with 9bit data frame using serial bus. Looking at the datasheet, we can enable 9bit data only in RS485 mode and, in this case, we have to choose the slave-address mode select mode SLAM. This functionality is not compatible with the master implementation of MDB/ICP protocol.

So, we would like to use the RS232 or RS485 only enabling the 9bit data frame without any other functionality attached.

I read the thread : Receiving UART data in 9-bit RS-485 mode -- https://community.nxp.com/thread/446737 but the answer is not clear for me and I can't find further information in the manual that can help me to solve the issue.

Best Regards,

            A.Biasci.

标记 (2)
0 项奖励
回复
3 回复数

2,637 次查看
alessandrobiasc
Contributor I

Dear all,

                   looking iMX6ULL reference manual, we try to understand the whole picture.

In 55.7.3 Receive 9-bit RS-485 frames, is reported the following sentence:

There are two slave address detect modes, normal detect mode and automatic detect
mode, and can be selected by SLAM (UMCR[1]).

In 55.7.3.1 RS-485 Slave Address Normal Detect Mode, is reported the following sentence:

To enable Normal Detect mode, clear SLAM (UMCR[1] to 0). The receiver ignores all
data frames (9 th bit = 0) until an address frame is received (9 th bit = 1). At that time, the
slave address detected (SAD = USR1[3]) bit is asserted and the interrupt_uart interrupt is
generated (if SADEN = UMCR[3] = 1). The address byte and sebsequent bytes are all put
into RxFIFO along with their 9 th bit.

In 55.15.17 UART RS-485 Mode Control Register (UARTx_UMCR), there is the SADEN bit inside UMCR register.

                             Description: RS-485 Slave Address Detected Interrupt Enable.

SADEN                      0    Disable RS-485 Slave Address Detected Interrupt
                                  1    Enable RS-485 Slave Address Detected Interrupt

We don't want this kind of functionality due to incompatibility with the MDB/ICP protocol:

The receiver ignores all data frames (9 th bit = 0) until an address frame is received (9 th bit = 1).

because a slave never sends its address on the bus.

Question:

  • disabling SADEN bit (set to 0), we also disable the Slave Address Detect Mode functionality, so the RS485 serial port will operate in "standard" mode (9 bit enabled) receiving all the characters received by the hardware ?

Regards,

        A.Biasci.

0 项奖励
回复

2,637 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello Alessandro,

One can try to add to compatible = "ptr,imx6ul-mdb"; strings as in

dts example linux/arch/arm/boot/dts/imx6ul.dtsi
imx6ul.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

imx.c\serial\tty\drivers - linux-imx - i.MX Linux kernel 

 

Regards

0 项奖励
回复

2,637 次查看
alessandrobiasc
Contributor I

Dear Bio_TICFSL,

                          I followed the links you provide but nothing refers to "imx6ul-mdb" in the code shown (Kernel 4.1.15_2.0.0_ga). DTS and imx.c driver are not using this kind of compatible. Also look inside linux-imx/4.9.11-r0 brach, the one used by our board, but I didn't find this kind of driver.

Regards,

       A.Biasci

0 项奖励
回复