STM8 MCUs

Discuss STM8 microcontrollers, including SWIM, USART configurations, RTC usage, ADC issues, and debugging.

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

RTC clock not starting consistenly

Hi everyone, I'm using the STM8L152R8 Nucleo board and trying to get the RTC running on the LSE clock. It works but only inconsistenly, about 2/3 runs error out in the RTC_EnterInitMode function of the SPL the below line. RTC_EnterInitMode is called ...

TConl.1 by Associate II
  • 1037 Views
  • 1 replies
  • 0 kudos

EEPROM - write 2 bytes

Hi :) Quick version: how to write 2 bytes (not in the same word) to the EEPROM in STM8? Should I write 1 byte and then wait for the EOP flag to be set before writing the second one?Long version: for now I am simply doing:unlock EEPROMwrite byte 1 (EE...

SLasn.1 by Senior
  • 1129 Views
  • 1 replies
  • 0 kudos

Sir, I am using 3 ADC channels in STM8S003F3 for purpose of AC voltage measurement and while AC Power down on any channel , board going to reset , please suggest me the perfect solution .

in my testing while I am down the power or power on of a any channel MCU is going to reset . I have attached a schematic of my board.If is there may issue of softwere code please suggest me the clock setup is void clock_setup(void){ CLK_DeInit(); ...

RSing.11 by Associate II
  • 771 Views
  • 0 replies
  • 0 kudos

Resolved! IWDG with long timeout

Hi everyone, I'm writing a program for a STM8L152R8 that sends data over UART to another mcu that should respond to me though I have a timeout on the transaction of five seconds using timer 4. I'd also like to include a watchdog however the max timeo...

TConl.1 by Associate II
  • 2828 Views
  • 7 replies
  • 0 kudos

STM8 EEPROM unlocking bug - it has been 8 years apparently

Hi!There is an issue with unlocking the EEPROM on STM8 (probably all of them, but I am using STM8L151). This article summarizes the issue very well: https://slime.systems/content/stm8-eeprom-bug/There it says it was first found in 2013, and here we a...

SLasn.1 by Senior
  • 796 Views
  • 0 replies
  • 0 kudos

Understanding if TIM2 works in low power modes STM8L151F2

Hello,I am trying to understand if TIM2 can still work for PWM output in low power modes. I can't find which peripherals are allowed to be on in the STM8L151F2 datasheet for the low power modes.To expand on my question. I assume that in Wait mode I ...

CProt.1 by Associate
  • 489 Views
  • 0 replies
  • 0 kudos

Doubt about I2C and CCRL register in STM8S207

Hello allCan anybody help me to understand the CCRL register?I´m using a 20 kHz crystal, so in the register I2C->FREQR i will put the value of 20, is it right?And how about the CCRL register, what is the correct value for the standart mode?I fount t...

MGarb.3 by Associate
  • 420 Views
  • 0 replies
  • 0 kudos

Odd progressive ST Visual Develop bug. STM8s001J

I've encountered a strange progressive bug on ST Visual Develop where the IDE gets progressively wonky as I run the debug to program my STM8S001J boards. First the icons start to look shifted and weird, then windows start disappearing and reappearing...

KUshi.1 by Associate
  • 637 Views
  • 2 replies
  • 0 kudos

SWIM corrupt

To check halt mode i've set all gpio's to out mode, but some of them was on same line with SWIM. Now i can't promgram mk =) How can i solve this problem? Maybe there is any way to hard clean memory? STM8L050J3M3SOLVEDDatasheet page 23 (https://www.st...

KAsta.1 by Associate
  • 506 Views
  • 0 replies
  • 0 kudos