Skip to main content
Associate II
August 18, 2026
Question

GPS data transmission using B-L072Z-LRWAN1

  • August 18, 2026
  • 2 replies
  • 34 views

I am trying to send GPS data from one B-L072Z-LRWAN1 to another B-L072Z-LRWAN1. There are 3 tasks to do this.
1. Get GPS data using a B-L072Z-LRWAN1.
2. Send text data from one B-L072Z-LRWAN1 to another B-L072Z-LRWAN1 using PingPong project.
3. Combine 1 and 2, send GPS data from one B-L072Z-LRWAN1 to another B-L072Z-LRWAN1.
Tasks 1 and 2 were successful, but I cannot do No.3 task. I compared the code that retrieves GPS data with the code that does nothing, and wrote the differences to the PingPong project. I've attached a portion of the code below. Could you give me a suggestion?

	if (transferComplete) {
snprintf(sval , sizeof(sval), "%s\r\n","test");
HAL_UART_Transmit( &huart2, sval, strlen(sval) + 1, 0xFFFF);
MX_SubGHz_Phy_Process();
transferComplete = 0;
/* Restart DMA reception */
HAL_NVIC_SystemReset();
HAL_UARTEx_ReceiveToIdle_DMA(&huart1, gpsBuffer, GPS_BUFFER_SIZE);
__HAL_DMA_DISABLE_IT(&hdma_usart1_rx, DMA_IT_HT);
}

HAL_Delay(1000);

 

2 replies

Ozone
Principal
August 21, 2026

Are you aware what HAL_NVIC_SystemReset() does ?

Associate II
August 22, 2026

HAL_NVIC_SystemReset() restarts B-L072Z-LRWAN1, I think. The issue is that if I place the send message before `if (transferComplete)`, I can send the text, but if I place it after `if (transferComplete)`, I can no longer send it. It seems that the interrupt handling for receiving GPS data is not working properly.