STMicroelectronics / STM32CubeWL

STM32Cube MCU Full FW Package for the STM32WL series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on boards provided by ST (Nucleo boards)
Other
107 stars 54 forks source link

Dead Lock during Retransmissions #45

Closed J0hanss0n closed 1 year ago

J0hanss0n commented 2 years ago

Set-up LSM100A based Evaluation Kit (STM32WL55JC) STM32CubeIDE Version: 1.10.1 https://github.com/SeongJiIoT/LSM100A_SDK

Description Function RegionCommonUpdateBandTimeOff (RegionCommon.c) can lead to a Dead Lock (at least during retransmissions), if bands[i].TimeCredits == creditCosts because the band[i].ReadyForTransmission is then set to false but a minTimeToWait = 0 is returned.

In ScheduleTx (LoraMac.c) the MacCtx.DutyCycleWaitTime is checked for != 0 and the timer is then not started.

Pull Request (just a proposal)

44

As an alternative the timer could be started with a minimal waiting time when MacCtx.DutyCycleWaitTime == 0

ASELSTM commented 2 years ago

ST Internal Reference: 134011

ASELSTM commented 2 years ago

Hi @J0hanss0n,

The issue you have raised out is confirmed. Indeed, this may cause a deadlock. The proposed fix will be made available in the frame of a future release. Thank you again for you report.

With regards