MPC5644A and MPC5644B different

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5644A and MPC5644B different

714 Views
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

Labels (1)
Tags (2)
0 Kudos
1 Reply

522 Views
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 Kudos