STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

How to SWITCH HSI to LSE for STM8L152C6 discovery board?

When I switch HSI to LSE using IAR, there is always an error that "Failed to get execution status: SWIM error [30004]: Comm timeout"There is switch function:void HSI_TO_LSE(void){   if(CLK_SCSR!=0x08)    // if LSE is not selected as the system clock ...

FCai.1 by Associate
  • 479 Views
  • 0 replies
  • 0 kudos

How to generate a sinusoidal PWM with variable frequency?

I'm trying to generate a sinusoidal PWM on STM8, but it's for an equipmetn that the user will change the frequency of the output sine wave while the PWM is running. I was able to generate a sinusoidal pwm easily for a fixed frequency, using a table I...

Triangle signal at the CCO Output (Port C4) / STM8S001JM3

Hi,I generate 2 mhz from the PORT / PIN C4 (CCO).The problem is that instead of a square signal, I get a triangle signal.What could be the reason????On PORT / PIN A3 i can generate a square signal, but not on C4I Use the STM8-SO8-DISCO Board in which...

STM8S clock and serial port initialization problems

I am using an IAR compilation environment, the microcontroller is STM8S105C4T6, but in the clock initialization, CLK__CKDIVR=0x00; the CLK__CKDIVR in this sentence keeps prompting that this function cannot be found.And it is the same when initializin...

SNorm.1 by Associate III
  • 425 Views
  • 1 replies
  • 0 kudos

Error - f_FLASH_ReadByte not defined when linking

I have just come back to STVD after a long while (and various changes of machine) and have reinstalled STVD and COSMIC. I can now compile my existing code but when trying to link it during the build process I get a page of errors like;#error clnk Rel...

jc1 by Associate II
  • 367 Views
  • 0 replies
  • 0 kudos

Hi all, My question is about the stm8 series. I am currently working with stm8s001jm3 and am trying to generate 2 MHz from a pin. The problem is that I can only generate a maximum of 380 kHz, although I have set everything correctly.

Im using the COSMIC Toolchain with the standard library.Here is the setting:##########################################################void clock_init(void){ CLK_DeInit();              CLK_HSECmd(DISABLE); CLK_LSICmd(DISABLE); CLK_HSICmd(ENABLE); whi...

ATürk.11 by Associate II
  • 1029 Views
  • 7 replies
  • 0 kudos