Does ST still maintain the STM8 Peripheral Libraries?
For example the status of "STM8L15x/16x/05x/AL3Lx/AL31x standard peripheral library" STSW-STM8016 claims it is active. But the release notes seem to suggest that the last time someone took a look at it was at the end of 2014. That's not very active.
Now, there are some problems with it, just as an example, if you want to use the AWU in a STM8L151C8 the SPL omits disabling the wakeup timer before trying to change its settings. In the code below I have added the blocks with (wilko) at the end.
STM8 mcu's are nice things and no doubt people will continue to (want to) use them, because sometimes an 8-bitter is all you need. But if ST stops supporting them...
void RTC_WakeUpClockConfig(RTC_WakeUpClock_TypeDef RTC_WakeUpClock)
{
/* Check the parameters */
assert_param(IS_RTC_WAKEUP_CLOCK(RTC_WakeUpClock));
/* Disable the write protection for RTC registers */
RTC->WPR = 0xCA;
RTC->WPR = 0x53;
// Disable the Wakeup timer in RTC_CR2 register (wilko)
RTC->CR2 &= (uint8_t)~RTC_CR2_WUTE;
//wait until access allowed (wilko)
while ((RTC->ISR1 & RTC_ISR1_WUTWF) != RTC_ISR1_WUTWF);
/* Clear the Wakeup Timer clock source bits in CR1 register */
RTC->CR1 &= (uint8_t)~RTC_CR1_WUCKSEL;
/* Configure the clock source */
RTC->CR1 |= (uint8_t)RTC_WakeUpClock;
// Enable the Wakeup timer in RTC_CR2 register (wilko)
RTC->CR2 |= (uint8_t)RTC_CR2_WUTE;
/* Enable the write protection for RTC registers */
RTC->WPR = 0xFF;
}