STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

I am working on PWM signal and the following code is not responding properly. Can someone explain where I am making a mistake. I need to generate pwm signal on PB0 (timer ch1)

/* MAIN.C file *  * Copyright (c) 2002-2005 STMicroelectronics */#include <iostm8l.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdint.h>#include "defs.h"unsigned int count = 0;unsigned int pwm_duty = 0x0000;void TIM2_SetCompar...

VSrin by Associate II
  • 325 Views
  • 0 replies
  • 0 kudos

How to make the keyword "click" to increment every time it enters the interrupt module. Please see the code below and help me out. All the time "Click" remains 0.

#include <iostm8l.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <stdint.h>#include <math.h>#include "defs.h"static int click = 0;void delay(unsigned long dd){  unsigned long i;  for (i=0;i<dd;i++) nop(); }void RTC(void){ unsigned...

VSrin by Associate II
  • 365 Views
  • 0 replies
  • 0 kudos

stm8s001j3 pin 6 not set output mode

HiI am using STM8S001J3 controlleron my project and I'm have some problem about it,6 pin GPIOB 4 It doesn't work.I don't know how to solve it.Please help me..//example code GPIO_DeInit(GPIOB);GPIO_Init(GOIOB,GPIO_PIN_ALL,GPIO_MODE_OUT_OD_HIZ_LOW);whi...

VP by Associate II
  • 511 Views
  • 2 replies
  • 1 kudos

SWIM ROTF does not correctly read a data block from memory

The host tries to write the STM8S001J3 flash memory and then read it through the SWIM interface. Writing a block of 64 bytes. happens correctly. However, reading steadily only works on 1 byte. When trying to read more bytes with one command, the resu...

Lehman by Associate II
  • 535 Views
  • 0 replies
  • 0 kudos

STEVAL-ISB044V1 cannot communicate with ST-Link V2

I'm using theᅠSTEVAL-ISB044V1 evaluation board for the wireless charging test. The evaluation board is based on STWBC-EP and can be programmed with ST-LINK V2. STM8AF6166 is the core of it, so I post here. I tried to program the board, and there's al...

0690X000009k4YFQAY.png 0690X000009k8BAQAY.png 0690X000009k8BtQAI.jpg
Dilemma by Associate II
  • 501 Views
  • 0 replies
  • 0 kudos

STM8 is little endian - right?

I have started writing some STM8 code in assembler and happened upon a memory assignment issue I can't explain.Globally I have segment 'ram0'Test_Word ds.w in code: ldw X, #$48 ldw Test_Word , X The two bytes of memory at location Test_Word i...

Joe.H by Senior
  • 495 Views
  • 2 replies
  • 0 kudos