Hi,
According to the reference manual, the range of the time compensation value is-127~128.However, When i configuring 128 to the time compensation value, the following error occurs,it out of range.
Can you give me some suggestions? the reference manual is not right?
The content in the data sheet is not wrong, and the setting range here is -128~127, and there is nothing wrong with it. The reason for the difference is that the 8-bit binary highest bit is signed.
Hi,
thank you Senlent.
what should this range be when I set it in the project?
const rtc_init_config_t rtcTimerInitCfg0 = {
.updateEnable = false,
.nonSupervisorAccessEnable = true,
.compensationInterval = 0U,
.compensation = 127, // What would be the range here? -128~127?
.clockSelect = RTC_CLK_SRC_LPO_1KHZ,
.clockOutConfig = RTC_CLKOUT_SRC_TSIC
};
Thank you again.