S32R274 UART

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

S32R274 UART

1,703 Views
evalin
Contributor III

Hello,

I have some problems about UART RX.

I use buffer mode and RX interrupt.if I send 2 Byte data to MCU from PC,UART can receive correct data.but if I send more than 2Byte data to MCU ,UART can receive the last two Byte data.the RX interrupt code show as follows:

void LIN1_rx_isr(void)
{

USART_RX_BUF[USART_RX_STA] = LINFlexD_1.BDRM.B.DATA4; 
USART_RX_STA++;


LINFlexD_1.UARTSR.R = 0x00000204; // clear DRF flag and release message bufffer


}

0 Kudos
Reply
3 Replies

1,408 Views
evalin
Contributor III

The problem has been solved.But I have some problems about Uart with DMA.

 I refrence the exmapleExample MPC5775K UART_with_DMA S32DS and transplanted it to S32R274,but I can not send or receive any data to PC.and it is sucessful if without  using DMA.But I found that there was no significant difference between these two MCU  DMA module.Is there something I ignore?

0 Kudos
Reply

1,408 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

I can't see real difference between these two parts. Have you initialized AIPS as shown in the example?

Regards,

Lukas

0 Kudos
Reply

1,408 Views
evalin
Contributor III

Thanks for your reply.the problem has been solved,DMAMUX and corresponding channel should be changged.But I have another question.

I want to use DMA UART RX,but I can only receive 4Byte data.I find eDMA can not set buffersize .eDMA can only move data from UART for once,what should I do?

0 Kudos
Reply