UART not receiving more than 1 byte

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

UART not receiving more than 1 byte

4,343 Views
PrabhuNex
Contributor II

Hi, i am trying to use LPUART0 with pin PTA2 - Rx and PTB1 - Tx  where it should receives 10 bytes of data using the LPUARTn NXP S32K11x MATLAB Library Block.

The Uart Recieve block has 1 input and 1 output signal. where the input is size. which i have given as 10. 

here, the C code generated is receiving only 1 byte even when i am sending 10 bytes together using UART terminal. On checking the code generated the buffer used to receive data is just a uint8 variable and not a array. 

/*generated code by MATLAB*/
/* Block signals (default storage) */ 
typedef struct {
real_T UnitDelay; /* '<Root>/Unit Delay' */
real_T Input; /* '<S1>/Input' */
uint32_T LPUART_RxTx_ISR_o2; /* '<Root>/LPUART_RxTx_ISR' */
uint8_T LPUART_Receive; /* '<S1>/LPUART_Receive' */
} B_gpio_s32k11x_T;
 

LPUART_DRV_ReceiveData(0, &gpio_s32k11x_B.LPUART_Receive, 10U);

/*********************************************/

Please help me here with MBD. What changes i should do to get all 10 bytes at once.

 

0 Kudos
Reply
0 Replies