apache / apache/nuttx

[BUG] A HARDFAIL occurred when running the up_rtc_settime function in stm32_rtcounter.c

Open
#18,173 2 comments 0 reactions 0 assignees View on GitHub
Arch: arm Area: Board support OS: Linux Type: Bug
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

### Description / Steps to reproduce the issue

1. Using the STM32F103 chip. When running to the function up_rtc_settime in the file stm32_rtcounter.c located in platforms/nuttx/NuttX/nuttx/arch/arm/src/stm32, the function encountered a hard failure.
2. In the function up_rtc_settime, the line putreg16(RTC_MAGIC, RTC_MAGIC_TIME_SET);, RTC_MAGIC_TIME_SET should be a register address, but currently it is a default illegal address: #define CONFIG_STM32_RTC_MAGIC_TIME_SET (0xf00d)
3. Currently, it has been found that this address cannot be modified even on the STM32F1 chip.

### On which OS does this issue occur?

[OS: Linux]

### What is the version of your OS?

Ubuntu 22.04

### NuttX Version

Release 11.0.0

### Issue Architecture

[Arch: arm]

### Issue Area

[Area: Board support]

### Host information

_No response_

### Verification

- [x] I have verified before submitting the report.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.