AnsweredAssumed Answered

MPC57XX Uart Send Problem

Question asked by Mikail ALTINTAŞ on Jun 7, 2019
Latest reply on Jun 9, 2019 by Petr Stancik

Hi, I have problem about uart send functionality.  If there is no data on receive I can send data but if data received when I send data  ,the program will stop at 

                                                       while (LINFlexD_0.UARTSR.B.DTFTFF == 0);

I put a secureCounter to while loop so it is go on working but I want to know why this happens. If I increase baud rate I see that event occurrence decrease. So I think that uart is not work full dublex.  Manual Reference says Uart is Full duplex but it is working as half dublex. 

My configuration is listed below:

 

nbLINFlex = 0;

LINFLEX[nbLINFlex]->LINCR1.B.INIT = 1; // enter initialization mode


LINFLEX[nbLINFlex]->UARTCR.B.UART = 1; //0=LIN 1=UART
LINFLEX[nbLINFlex]->UARTCR.B.PCE = 0; //0 = parity disabled, 1 = parity enabled
LINFLEX[nbLINFlex]->UARTCR.B.PC0 = 0; //0 = even parity, 1 = odd parity
LINFLEX[nbLINFlex]->UARTCR.B.WL0 = 1; //0 7-bit data + parity bit *** 1 8-bit data (or 9-bit if PCE is set).

LINFLEX[nbLINFlex]->UARTCR.B.TxEn = 1;
LINFLEX[nbLINFlex]->UARTCR.B.RxEn = 1;


LINFLEX_InitRxBuffer(nbLINFlex,1);

LINFLEX[nbLINFlex]->UARTSR.B.DRFRFE = 1; // clear DRF flag (Data Reception Complete Flag)
LINFLEX[nbLINFlex]->UARTSR.B.DTFTFF = 1; // clear DTF flag (Data Transmission Complete Flag)
LINFLEX[nbLINFlex]->LINCR1.B.INIT = 0; // enter normal mode

 

Is there any solution to solve this. 

Outcomes