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

Can anyone find out that sleep mode in my code is correct

#include "stm8s.h" #include "stm8s_clk.h" #include "stm8s_adc1.h" #include "stm8s_gpio.h" #include "stm8s_tim2.h" #include "main.h" #include "flash.h" #include "stm8s_awu.h" volatile unsigned short _500ms_tick; volatile unsigned short idle_counte...

SRAM.11 by Associate III
  • 945 Views
  • 1 replies
  • 0 kudos

Why does Timer1 seem to have a slower clock?

I have a common function that I use to set up Timer 5 (I'm using it for PWM output, if it matters):timerCounts = CLK_GetClockFreq() / pow(2, TIM5_PRESALER_xx) / pwmFrequency;TIM5_TimeBaseInit(TIM5_PRESCALER_xx, timerCounts);And that works really well...

AWern.2 by Associate
  • 881 Views
  • 1 replies
  • 0 kudos

Stop iwdg in halt mode on STM8L051F3

HeyI have tried to use the option byte to stop the iwdg when i enter halt.I can see that i manage to set the WDG_HALTin option byte 3.But the watchdog still resets the MCU after i enter halt. Please help me, cant i do it? If so then how do i read tha...

PRasm.3 by Associate II
  • 3019 Views
  • 15 replies
  • 0 kudos

Not able to debug - gdi-error [40412] Abort command is not possible in this CPU state (halt, wfi, protected code execution)

Hello Team I am using STVD IDE with cosmic compiler for development on STM8S207 series controller.I have two configurations in project called release and debug. whenever I try to debug code in debug configuration, following attached error appears whe...

SDalv.1 by Associate II
  • 1677 Views
  • 3 replies
  • 0 kudos

Generating firmware for 1kW Traction Motor Controller with STM8 MCU

We wanted to design 1kW traction motor controller for 3 phase BLDC motor., Therefore we were referring to this document found here.We tried generating the library with e STM8 MC FW builder and it worked fine. But these were only header file and no so...

Tamojit by Associate II
  • 1585 Views
  • 4 replies
  • 1 kudos

I am getting my MV values in ADC as 268 but for my requirements it should read vge equivalent to 1.31 but I am getting only 0.8 with Vref 3.3v.Can any help me with my configuration is correct .What is my mistake here please

/* MAIN.C file *  * Copyright (c) 2002-2005 STMicroelectronics */#include "stm8s.h"#include "stm8s_clk.h"#include "stm8s_adc1.h"void Clk_Config(void);void ADC_Config(void);void ADC_Read(uint16_t *MV);main(){ unsigned short MV; Clk_Config(); ADC_Confi...

SRAM.11 by Associate III
  • 876 Views
  • 0 replies
  • 0 kudos