Question
Invalid Teseo LIV3FL reading using STM32 Nucle-WL55JC1
I'm planning to make a GPS tracker using Teseo LIV3FL as a slave device and STM32 Nucle-WL55JC1 MCU with I2C communication protocol. The I2C reading is working (I assumed it works since I'm receiveing some data), but the problem is when I take one of the reading and decode it using a GPGGA (or similar) decoder it says I got an invalid data.
Serial monitor
Decoded data
And code snippet for sensor reading
while (1)
{
/* USER CODE BEGIN 3 */
if (HAL_I2C_IsDeviceReady(&hi2c1, 0x3A <<1 + 0, 2, 10) == HAL_OK) {
HAL_I2C_Master_Receive(&hi2c1, 0x3A <<1 + 0, (uint8_t *)receivedData, sizeof(receivedData), 1000);
HAL_UART_Transmit(&huart2, (uint8_t*)receivedData, sizeof(receivedData), 1000);
while (HAL_I2C_GetState(&hi2c1) != HAL_I2C_STATE_READY);
} else {
uint8_t state[10] = "DEVICE IS NOT READY\n";
HAL_UART_Transmit(&huart2, (uint8_t*)state, sizeof(state), 1000);
}
HAL_Delay(500);
}Any idea where did I go wrong? Thank you.
