The range of RTC compensation value S32K148

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The range of RTC compensation value S32K148

967 Views
SONGTAOSI
Contributor I

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.

SONGTAOSI_0-1677650398173.png

 

Can you give me some suggestions? the reference manual is not right?

 

 

0 Kudos
Reply
2 Replies

949 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@SONGTAOSI

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.

0 Kudos
Reply

945 Views
SONGTAOSI
Contributor I

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.

0 Kudos
Reply