This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SCI Multi-Buffer Mode

Other Parts Discussed in Thread: RM48L952

I am using the RM48 Hercules Development Kit, with a RM48l952 MCU .

I managed to transmite data in Single-Buffer  Mode using  SCI2(SCI/LIN module) interrupt mode .Now  I  want  to  change it   into  Multi-Buffer  Mode .As 

described  in the mannual ,Multi-Buffer Mode is selected when MBUF MODE bit is 1.And the data to be transmitted has to be written to LINTD0 and LINTD1

register, based on the number of bytes.So I  changed the programme as follows,but it didn't  work. What  should I do ?

#include "lin.h"

scilinREG->GCR1 = (1 << 25)  /* enable transmit */
                  | (1 << 24)  /* enable receive */
                  | (1 << 10)  /* enable multi-buffer */
                  | (1 << 5)   /* internal clock (device has no clock pin) */
                  | ((2-1) << 4)  /* number of stop bits */
                  | (0 << 3)  /* even parity, otherwise odd */
                  | (0 << 2)  /* enable parity */
                  | (1 << 1);  /* asynchronous timing mode */

void linHighLevelInterrupt(void)

 case 12:
        /* transmit */
     //if(--g_sciTransfer[1].length > 0)
     //  {
     //         scilinREG->TD = *g_sciTransfer[1].data++;
     //  }


      if (--g_sciTransfer[1].length > 0)
         {
               //scilinREG->TD = *g_sciTransfer[1].data++;
               length = g_sciTransfer[1].length;
         *pData = *g_sciTransfer[1].data + length;

         for (i = length; i >= 0; i--)
         {
             linREG->TDx[i] = *pData--;
         }

         }
         else
         {
            scilinREG->CLRINT = SCI_TX_INT;
            sciNotification(scilinREG, SCI_TX_INT);
         }

        break;