The SCI baud rate of the S32K314 secondary initialization is abnormal

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

The SCI baud rate of the S32K314 secondary initialization is abnormal

1,120 Views
shunyizhang
Contributor IV

init:

    uartFreq = Clock_Ip_GetClockFrequency(LPUART0_CLK);
   //Lpuart_Uart_Ip_Deinit(LPUART_UART_IP_INSTANCE_USING_0);
    /*初始化UART1管脚*/
    BSPGPIOSetOutputMuxModeState(ePOR_A_L, ePIN_3, ePORT_OUT_MUX_ALT6); //设置PORT管脚为UART_TX功能
    BSPGPIOSetInputMuxModeState(ePOR_A_L, ePIN_2, ePORT_IN_MUX_ALT1, 699); //设置PORT管脚为UART_RX功能
    /*初始化UART1*/
   Lpuart_Uart_Ip_Init(LPUART_UART_IP_INSTANCE_USING_0,&Lpuart_Uart_Ip_xHwConfigPB_0);
Lpuart_Uart_Ip_SetBaudRate(LPUART_UART_IP_INSTANCE_USING_0,(Lpuart_Uart_Ip_BaudrateType)rate, uartFreq);
 
/* Install IRQ handler for UART0 */
IntCtrl_Ip_InstallHandler(LPUART0_IRQn, LPUART_UART_IP_0_IRQHandler, NULL_PTR);
/* Enable UART0 interrupt in NVIC */
IntCtrl_Ip_EnableIrq(LPUART0_IRQn);
 
At the beginning, the rate variable was assigned a value of 19200, and the communication was normal during initialization. The third-party serial port tool was used, and the serial port was sent and received normally. Next, I re-assigned the rate variable to 115200 by online modification and repeated the above code. The following problem occurs (/* Implement default assert macro */). Is there a problem with the steps I take? Do NXP engineers give some support? Thank you
 

 

 

0 Kudos
Reply
3 Replies

1,070 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shunyizhang,

I can't find /* Implement default assert macro */ in the source code.

Which RTD version do you use?

What paremeters do you pass to the function?

 

Regards,

Daniel

0 Kudos
Reply

1,019 Views
shunyizhang
Contributor IV

RTD version:V3.0.0

The incoming parameters is rate, numerical is 4800/9600/19200/38400/57600/115200

0 Kudos
Reply

996 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @shunyizhang,

Where can I found the error in the source code?

Can you post a screenshot of it?

Why don't you read the return status codes of the APIs you call?

 

Regards,

Daniel

 

0 Kudos
Reply