MPC5644A and MPC5644B different

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

MPC5644A and MPC5644B different

941 次查看
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 回复

749 次查看
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 项奖励
回复