AnsweredAssumed Answered

2018R1  SDK0.8.6  LPUART IRQ Problem

Question asked by 建宽高 on Oct 11, 2018
Latest reply on Oct 14, 2018 by 建宽高

hi,when i config lpuart2

```

LPUART_Type *base = g_lpuartBase[INST_LPUART2];

LPUART_DRV_Init(INST_LPUART2, &lpuart2_State, &lpuart2_InitConfig0);
INT_SYS_InstallHandler(g_lpuartRxTxIrqId[INST_LPUART2], DEBUG_DRV_IRQHandler, (isr_t *) 0);
INT_SYS_SetPriority(LPUART2_RxTx_IRQn, 2);

/* Enable the receive data overrun interrupt */
LPUART_SetIntMode(base, LPUART_INT_RX_OVERRUN, true);

/* Enable the receive data overrun interrupt */
LPUART_SetIntMode(base, LPUART_INT_FRAME_ERR_FLAG, false);

/* Enable receive data full interrupt */
LPUART_SetIntMode(base, LPUART_INT_RX_DATA_REG_FULL, true);

```

 

in this code 

 

```

LPUART_SetIntMode(base, LPUART_INT_RX_DATA_REG_FULL, true);

```

 

it willl go to this breakpoint,frame error, why ,and   use  api   get receive byte is zero, why ?  

 

```

uint8_t rb;

LPUART_Getchar(base, &rb)

```

 

rb result is zero

 

Outcomes