2024-04-23 07:05 AM
Hi,
We have been using the STM32WLE5CB for a while now, using the older die revision Z. Since we have a new batch with the new revision Y die of the STM32WLE5x we couldn't get our firmware working anymore.
To try make it work we have tried to use the example LoRaWAN endnode and couldn't get it working on this revision. It seems to get stuck in initializing the RTC Alarm in the MX_NVIC_Init()
HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn);
Where it finally crashes in the core_cm4.h
/**
\brief Get Interrupt Enable status
\details Returns a device specific interrupt enable status from the NVIC interrupt controller.
\param [in] IRQn Device specific interrupt number.
\return 0 Interrupt is not enabled.
\return 1 Interrupt is enabled.
\note IRQn must not be negative.
*/
__STATIC_INLINE uint32_t __NVIC_GetEnableIRQ(IRQn_Type IRQn)
{
if ((int32_t)(IRQn) >= 0)
{
return((uint32_t)(((NVIC->ISER[(((uint32_t)IRQn) >> 5UL)] & (1UL << (((uint32_t)IRQn) & 0x1FUL))) != 0UL) ? 1UL : 0UL));
}
else
{
return(0U);
}
}
Does anyone know what difference there is between Revision Z and Y, and how I can resolve my problem? The 32kHz RTC clock is working on my board where I have looked at the LSCO Clock Output on a scope.
Solved! Go to Solution.
2024-08-01 02:46 AM
It seems to be that the custom PCB was the issue, where the PH3-Boot0 pin was floating.
2024-04-23 08:39 AM
Hello @6313oscar and welcome to the ST Community :smiling_face_with_smiling_eyes:.
First, are you using both revisions on the same design or different ones ?
Second, Is it exactlly the same MCU on both revisions (the STM32WLE5CB)?
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-04-23 08:57 AM
Hello STTwo-32,
It's the same design with one the STM32WLE5CBU6 on board as a LoRaWAN endnode sensor, we just got a new batch of PCB's with the new die revision Y on it. previously it was die revision Z on the design, the rest of the PCB design didn't change.
kind regards,
Oscar
2024-04-29 02:07 AM
It seems to go through the NVIC enable when __HAL_RCC_RTCAPB_CLK_ENABLE(); is comment-out. But now I cannot init the RTCAPB afterwards.
void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle)
{
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(rtcHandle->Instance == RTC)
{
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
{
Error_Handler();
}
__HAL_RCC_RTC_ENABLE(); // Enable RTC clock
/*
* With the RTCAPB CLK enable comment-out it will go through the HAL_NVIC_enableIRQ
*/
// __HAL_RCC_RTCAPB_CLK_ENABLE();
HAL_NVIC_SetPriority(RTC_Alarm_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn);
// RTC interrupt Init for timestamps, etc.
HAL_NVIC_SetPriority(TAMP_STAMP_LSECSS_SSRU_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TAMP_STAMP_LSECSS_SSRU_IRQn);
}
}
2024-05-30 02:41 AM
Hello @6313oscar
This issue has been escalated internally for more investigation (under internal ticket number 179798).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-06-19 03:31 AM
Hello @6313oscar
Our Support team are not able to reproduce this issue. Can you give as the STM32CubeWL version that you are using.
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-12 03:33 AM
STM32CubeIDE
Version: 1.16.0
Build: 21983_20240628_1741 (UTC)
2024-07-12 03:38 AM
I'm asking for the STM32CubeWL version that you are using. For the last version (V1.3.0, we are not able to reproduce this).
Best Regards.
STTwo-32
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-07-12 04:01 AM
I am using the latest version V1.3.0
I will check on our end what the problem could be next.
2024-07-21 11:26 AM
Hi,
I have a very similar problem on my side with an ST50H which has an STM32WLE5JCIx.
During a flash everything works fine. And if I unplug/replug the system, the program loops on RTC alarms.