2019-02-13 05:17 AM
2019-02-15 11:50 AM
And writing to RTC->CALR?
JW
2019-02-18 12:25 AM
the function from ST library should direct write to this register, but does not, although write permissions are released. The debugger is walking to the command, the parameter have valid values and the function returns SUCCESS, but the register remains 0x0000
ErrorStatus RTC_SmoothCalibConfig(uint32_t RTC_SmoothCalibPeriod,
uint32_t RTC_SmoothCalibPlusPulses,
uint32_t RTC_SmouthCalibMinusPulsesValue)
{
...
/* Configure the Smooth calibration settings */
RTC->CALR = (uint32_t)((uint32_t)RTC_SmoothCalibPeriod | (uint32_t)RTC_SmoothCalibPlusPulses | (uint32_t)RTC_SmouthCalibMinusPulsesValue);
...
}
2019-02-18 01:01 AM
And writing to other RTC registers at that moment succeeds?
Is RTC clock running? Is PWR_CR.DBP set (check by reading back).
JW
2019-02-18 02:19 AM
ok, found the problem:
PWR_BackupAccessCmd( ENABLE ); // Allow access to BKP Domain
has to be additionally set before 'RTC_SmoothCalibConfig'
... and after don't forget to reset into safe estate with
PWR_BackupAccessCmd( DISABLE ); // deny access to BKP Domain
thx for support