2023-01-18 08:47 AM
The generated code in rtc.c passes zeros in GPIO_InitStruct to HAL_GPIO_Init, causing assert_param(IS_GPIO_PIN_AVAILABLE(GPIOx, (GPIO_Init->Pin))); to fail.
void HAL_RTC_MspInit(RTC_HandleTypeDef* rtcHandle)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
if(rtcHandle->Instance==RTC)
{
/* USER CODE BEGIN RTC_MspInit 0 */
/* USER CODE END RTC_MspInit 0 */
/* RTC clock enable */
__HAL_RCC_RTC_ENABLE();
__HAL_RCC_GPIOC_CLK_ENABLE();
/**RTC GPIO Configuration
PC13 ------> RTC_OUT_CALIB
*/
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
/* USER CODE BEGIN RTC_MspInit 1 */
/* USER CODE END RTC_MspInit 1 */
}
}
Project settings:
STM32L071RBtx processor
Generate peripheral initialization as a pair of .c/.h files
Enable Full Assert checked
Firmware Package Name and Version: STM32Cube FW_L0 V1.12.1
Version 6.6.1 of STM32CubeMX
RTC Settings:
Activate Clock Source checked
Calibration set to "Calibration 1Hz"
PC13 configured as RTC_OUT_CALIB.
2023-02-10 05:14 AM
Hi @Jshelson ,
Sorry for delay to answer your request.
Please note that there is currently a new version of STM32CubeMX tool available (6.7.0).
Could you please make sure first to be aligned with last updates then let me know if described issue is still being faced?
Thanks.
-Amel
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.
2023-02-17 08:37 AM
I just tried again with the latest version of STM32CubeMX and the issue is still present.
2023-02-21 12:52 AM
Hello @Jshelson ,
Thanks for coming back and providing your answer.
As issue persists with latest STM32CubeMX version, I let our expert @Semer CHERNI review it deeply and take relevant corrective action.
-Amel
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.
2023-03-07 07:00 AM
Hi Amel,
Do you have an update on this? Was @Semer CHERNI able to reproduce the issue?
2023-03-22 07:38 AM
Hi @Amel NASRI,
Do you have any progress to share on this issue?