STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

sdcc support for standard peripheral library?

The standard library for stm8 can only use Cosmic, Raisonance and IAR compilers, which are all either non-free or limited in some way or another. Is there a plan to include support for sdcc (or at least a way to use it)?

BSerb by Associate II
  • 1331 Views
  • 9 replies
  • 1 kudos

need to wait for GPIO configure?

GPIO_Init(GPIOD, R4_GPIO_PINS, GPIO_Mode_In_FL_No_IT); GPIO_Init(GPIOD, R6_GPIO_PINS, GPIO_Mode_In_FL_No_IT); delay_ms(1); DOes gpio configure need to wait for completion?

Does anyone have a problem writing to Eeprom? When I try to write say a '0x80, a '0x3f' is reported as written So I stored my data as 4 bit nybbles, , which works (I'm using the discovery Board.) Russ

char *address = (char *) 0x4000; void flashwrite(char dat)   {       // thanks to https://github.com/midnight-wonderer/stm8-eeprom-bug/blob/workaround-//method/src/firmware.c  // one Mr. Sarun Rattanasiri                                            wh...

RHell by Associate
  • 366 Views
  • 0 replies
  • 0 kudos

Device is protected

I'm sorry, I'm not a STM8 developerI just want to upgrade an RFID readerThe CPU is STM8S003F3The programmer is ST-LINK V2The connection is SWIMThe programmer is ST Visual ProgrammerIt gives me the error "The device is protected"Is there any way to er...

GEvan by Associate
  • 2051 Views
  • 1 replies
  • 0 kudos

Input Capture using timers.

HiI'm working on a BLDC Motor control project using STM8S Discovery Board (STM8S 105C6T6 MCU). I need to read the hall sensor inputs from my motor onto the three channels of TIM 2. So I thought of getting acquainted with the mechanism of input captur...

DebD21 by Associate
  • 402 Views
  • 0 replies
  • 0 kudos

What is the sampling rate in adc??

I have some confusion about sampling rate in adc,in data sheet it conversion time takes 14 clock cycles, then i am using internal oscillator 16mhz and prescalar selection is 8 and i get conversation time is 3.5micro seconds,i want know about exactly ...

SP.9 by Associate II
  • 412 Views
  • 0 replies
  • 0 kudos

Resolved! Dangerous error causes fires and devastation!

Hi. I'm glad you're reading this, i hope you can help.Click-bait aside, i experience a nasty and unexpected behavior of external interrupts in a professional, industrial product designed around STM8AL318ATC.In short, there are 2 digital signals (from...

0690X00000AQqq6QAD.png
arta by Associate II
  • 1481 Views
  • 5 replies
  • 0 kudos

Hi All, I am new to STM8S and not yet that good at microcontroller programming in general. I am trying to learn about timers/counters in microcontrollers. I wrote following code to toggle an LED connected at PD1 pin in each second.

#include <stdint.h>#include<iostm8s.h>void main(void){         TIM2_PSCR = 0b00000111;  TIM2_EGR= 0x01; TIM1_CR1 = 0x01;    PD_DDR = 0x01; PD_CR1 = 0x01; while(1) { if ( ( ((uint16_t)TIM2_CNTRH << 8) + (uint16_t)TIM2_CNTRL ) >= 15625 )  { TIM2_...

SP.9 by Associate II
  • 686 Views
  • 3 replies
  • 0 kudos