2025-06-24 12:19 PM - last edited on 2025-06-24 1:13 PM by Peter BENSCH
Hello, I’m facing an issue using the RAK3172. In my project, UART1 is configured for debugging and LoRaWAN logs, while UART1 (PB6/PB7) is reserved for communication with the LC76G GPS module.
However, I'm unable to print any data from the GPS module to the monitor. So, I performed two steps to verify whether the module is actually working:
I checked the current consumption using a multimeter;
I soldered a wire directly to the module's TX pin and used a TTL converter to confirm that NMEA data is indeed being sent.
Based on that, I searched the forum and saw that others have experienced issues with UART1 on this module, but I couldn’t find a clear solution.
These are the two functions I’ve implemented so far, and I’m calling them during the LoRa initialization. I’d like to point out that they were used successfully in a previous project with an STM32L4, and everything worked fine there.
void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef *huart, uint16_t Size)
{
if (huart == &huart1)
{
printf(gpsData.rxDataBuffer);
}
}
void GPS_reset(GPIO_TypeDef *GPIOx, uint16_t pin)
{
HAL_GPIO_WritePin(GPIOx, pin, RESET);
HAL_Delay(500); // datasheet = 100ms, but this seemed too short
HAL_GPIO_WritePin(GPIOx, pin, SET);
printf("RESET DONE\n");
}
2025-06-24 1:36 PM
Test the UART1 in loopback. Short the Tx to the Rx pins and send some data. You should be able to get calls to HAL_UARTEx_RxEventCallback. If not, then you have some configurations to look at. Worse case, damaged peripheral.