Hi,
I will try to solve your queries and explain how the mentioned method works, I hope that the explanations is good enough.
The SetCompensationPeriodAndValue method writes directly to the RTC_TCR register, here is the register view on the Reference Manual.

Here you can see there are two fields named CIR and TCR, they have the default/reset value to zero.

The CIR field, corresponds to the Period parameter of the SetCompensationPeriodAndValue method, in the picture above you can see the explanation.
In other words the CIR field will control how often the compensation value will be set, this means that if you want to compensate the RTC value every 4 seconds you need to write Period = 4. In the words of the reference manual: “The compensation interval is used to adjust the frequency at which the time compensation value is used, that is, from once a second to once every 256 seconds.”

The TCR field, corresponds to the Value parameter of the SetCompensationPeriodAndValue method, in the picture above you can see the explanation.
In other words, this value will control how many clock cycles form the 32.768 KHz clock will be needed to overflow the Prescaler Register. Normally the value is 32768 clock cycles, this means that the Preescaler Register will overflow every 32768 clock cycles. With the Value parameter value you can control the number of clock cycles adding or subtracting clock cycles for a fine compensation. In the words of the Reference manual: “The time compensation value is used to adjust the number of clock cycles between -127 and +128. Cycles are added or subtracted from the prescaler register when the prescaler register equals 0x3FFF and then increments.”
The section Time counter in the reference manual explains how the 32-bit seconds counter and the 16-bit prescaler register are related. The Seconds counter, as the name refers, increments every 1 second; but this increment happens every time that a falling edge of the 14 bit of the prescaler register occurs or Prescaler register = 0x3FFF that is the same.
You can select how often you do the compensation (CIR field) and how many clock cycles (TCR field) will take to the Prescaler register to reach 0x3FFF incrementing every time by one.
Having said this, I will try to answer your questions:
Q: Does it mean that on every overflow of the prescaler its starting value is being modified?
A: Yes, every time the Prescaler register reaches 0x3FFF the values written in the RTC_TCR[TCR] field will be updated, if a changed was done, and will be loaded to the compensation value. This means that the next time the new RTC_TCR[TCR] will be the valid one.
Q: Does this updated starting value is remembered and is a base for later cycles additions/subtractions?
A: As mentioned before if you do not change the RTC_TCR[TCR] values this will NOT be changed or reset.
Q: What would be the procedure for subtracting 1000 cycles from the prescaller before starting RTC (Value range is only signed char [-127,+128])? Or should it be rather done in assembly because it is not possible to make use of RTC_TPR's full range in PE code?
A: The range is from -127 to +128 because it is just a fine compensation value. Also it is because the RTC_TCR[TCR] filed is a 8 bit field and has a range of 255 valid numbers.
Q: How about Period setting: setting it to 1 second provides updates to the prescaler every second by cumulating Value offset or it is just doing every time Value change to the prescaler from the same base: 32768 cycles to overflow?
A: The explanation is above. The values of the CIR filed is related to the RTC_TSR register that increments every second. Then if you set Period to 1 second every time the RTC_TSR register increments the Compensation process will take effect.
Q: If Period is set to 0 issued offset is cancelled or remains until RTC is running?
A: The default value is 0 and this means, as the RM mentions, write zero to configure for a compensation interval of one second.
Q: What happens if Period =1 and Value = 0 and second ago Value was != 0. Prescaler modification remain or is being cancelled?
A: If Period is 1 RTC_TCR [CIR] = 1 and RTC_TCR[TCR] = 0. If a second ago RTC_TCR[TCR] != 0 then the next time the Prescaler register reaches 0x3FFF the new value RTC_TCR[TCR] = 0 will be loaded and the time compensation value will be 00 = Time Prescaler Register overflows every 32768 clock cycles.
Hope this information can help you.
Best Regards,
Adrian Sanchez Cano
Technical Support Engineer
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------