hello everyone
I am using SPC5748G.
I am using UART with LINFLEXD_UART2
The baudrate is 921600, and it is connected to the Wi-Fi module.
The data sent by the Wi-Fi module is processed in the callback with the install_rxcallback function.
The problem is that when I store the received data as an array, even bytes are missing.
ex:) If the total content to be received is "+eventapp:boot_complete",
The actual received data receives "+vnapbo_opee" and stores it in an array.
The callback function is as follows.
void WiFi_UART_Callback(void *driverState, uart_event_t event, void *userData)
{
char Str_Test = 0;
// Disable interrupt
INT_SYS_DisableIRQ(LINFLEXD2_RX_IRQn);
INT_SYS_DisableIRQ(LINFLEXD2_TX_IRQn);
//
LINFLEXD_UART_DRV_ReceiveData(INST_WIFI_UART, &WiFi_UART_RX_Buffer, 1U);
WiFi_Received_Data[WiFi_Received_Count] = WiFi_UART_RX_Buffer;
WiFi_Received_Count++;
// Str_Test = strstr(WiFi_Received_Data, "complete");
if(WiFi_Received_Count >= 20)
{
Str_Test = 0xFF;
}
// // Enable interrupt
INT_SYS_EnableIRQ(LINFLEXD2_RX_IRQn);
INT_SYS_EnableIRQ(LINFLEXD2_TX_IRQn);
}
The clock settings are as follows.
LIN2_CLK - Interface Clock : F40, Clock Source : F80, Frequency : 80MHz
I don't know what the hell is the problem.
Thank you very much for your reply. thank you.