MPC5644A and MPC5644B different

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPC5644A and MPC5644B different

977件の閲覧回数
marklien
Contributor I

What is the different between MPC5644A and MPC5644B ?

I am currently using MPC5644A, and using 2 UART (SCI_B_TX, SCI_B_RX, SCI_C_TX, SCI_C_RX) for communication.

Whein SCI_B and SCI_C both work in 2 second, the step will stop on below red char.

 

static void xxx_TxData( char* pBuf, const uint32_t cnt)

{

    uint16_t       j = 0;

    SIU.GPDO[192].R = 0x1;

    for (j=0; j< cnt; j++)

    {  /* Loop for character string */

   

        /* Wait for transmit data reg empty = 1 */

        //while (ESCI_B.SR.B.TDRE == 0) {}

        ESCI_B.SR.R = 0x80000000;              /* Clear TDRE flag */

        ESCI_B.DR.B.D = *(pBuf+j);          /* Transmit 8 bits Data */

while (ESCI_B.SR.B.TDRE == 0)

                {

                };        

    }

 

        for(j=0;j<900;j++)

        {}

        SIU.GPDO[192].R = 0;

 

 

Attached is the receive interrupt code.

Original Attachment has been moved to: code.txt.zip

ラベル(1)
タグ(2)
0 件の賞賛
返信
1 返信

785件の閲覧回数
martin_kovar
NXP Employee
NXP Employee

Hi,

it seems you clear TDRE flag in your receive interrupt handler. You must not clear RDRF flag by bit access.

Replace the following line in your interrupt handler:

ESCI_B.SR.B.RDRF = 0b1;

and use this code:

ESCI_B.SR.R = 0x2000;

Please look at the following picture, where the difference between .B and .R access is explained.

pastedImage_1.png

Regards,

Martin

0 件の賞賛
返信