2 Replies Latest reply on Sep 4, 2019 11:00 PM by JoZh_4299466

    SCB UART in Multi Processor mode

              Hello Everyone, SCB UART has the feature of using it in Multiprocessor mode. The multiprocessor mode is also known as UART 9-bits protocol, while standard UART protocol uses 5 to 8-bits data field. The main properties of multiprocessor mode are: 1. Single master with multiple slave concept (multi-drop network) 2. Each slave is identified by a unique address 3. Using 9 bits data field, with the 9th bit (MSB) as address/data flag. When set ‘1’, it indicates an address byte; when set ‘0’ it indicates a data byte. 4. Parity bit is disabled In the attached document, there are 3 projects. Slave_add_02 and Slave_add_03 are the slaves and Uart_Multiprocessor is the master. The function "SCB_UartPutChar(0x103)" in the master project selects the slave with address 0x03. 1 in 103 represents the 9th bit and since its 1, it represents address. The software takes care of selecting the corresponding device. It is left to you to put this byte in Rx Buffer. Either ways it will discard the 9th bit. This can be configured in configuration window. In the attached project, I have configured one slave to receive address in Rx buffer and other slave not to receive. So for the slave that has been configured to receive address in Rx buffer will have its address as the first data received. If the address sent by the master matches, the slave will receive subsequent bytes otherwise it discards. So you don't need to monitor for the 9th bit. It just says if the received byte is address or data. Thank You, Sunday   
        • 1. Re: SCB UART in Multi Processor mode

          Hi

             

          on transmit section ,you are written well but how to receive 9bit not there ,

             

          as i am working on MDB its say both transmit and receive are 9bit

             

          if you are having any work update on MDB ,let me know

             

          regards

             

          Habib

          • 2. Re: SCB UART in Multi Processor mode
            JoZh_4299466

            Hi,

             

            In your post, you said that

             

            So you don't need to monitor for the 9th bit. It just says if the received byte is address or data.

             

            Can you explain a little bit more? I don't see how you have achieved this in your code. Once the 9th bit is discarded, the remaining 8 bits do not encode whether they are address byte or data byte. Say I have a byte in the rx buffer, how do I know if it's address or data?

             

            For example, let's say the master continuously send out packets consisting of (address byte, data byte, data byte) and in the address byte there is additional encoding other than address alone. The rx side needs to discern if the byte is an address byte or data byte. Because there might be frame errors, in the case a byte is dropped, the rx side cannot assume the packet structure and needs to check the type of the byte.  

             

            Thanks,

            John