STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

Std Peripheral Library for ADC throws COSMIC compiler errors

My project uses the ADC on an STM8S and as it compiles using Cosmic the stm8s_adc1 module throws a huge number of compiler errors as follows:Compiling stm8s_adc1.c...cxstm8 +modsl0 +debug -pxp -no -pp -l -i"C:\Program Files (x86)\COSMIC\FSE_Compilers...

BCowa by Associate II
  • 387 Views
  • 0 replies
  • 0 kudos

Couple of days ago, I configured the mcu (stm8l-discovery) in low power mode to see the current consumption. But if i run the same code again, I was not able to see the same results. The mcu is not entering the low power mode

#include "iostm8l.h"#include <stdint.h>#include <stdio.h>#include "defs.h"main(){ CLK_DIVR = 0x00; // Set the frequency to 16 MHz while(1) { if (PWR_CSR2 & 0x01 == 0x01) { break; } } PWR_CSR2 |= (1<<1); while (1) { halt(); }}

VSrin by Associate II
  • 463 Views
  • 4 replies
  • 0 kudos

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
  • 1429 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
  • 377 Views
  • 0 replies
  • 0 kudos