STM8 MCUs

cancel
Showing results for 
Search instead for 
Did you mean: 

Forum Posts

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
  • 629 Views
  • 3 replies
  • 0 kudos

STM8 USART one time receive only two bytes

INTERRUPT_HANDLER(USART1_RX_TIM5_CC_IRQHandler,28) { /* In order to detect unexpected events during development, it is recommended to set a breakpoint on the following instruction. */ //uint8_t temp = USART1->SR; ...

0690X00000AQsoMQAT.png

stm8 tx by interrupt output many \0

INTERRUPT_HANDLER(USART1_TX_TIM5_UPD_OVF_TRG_BRK_IRQHandler,27) { /* In order to detect unexpected events during development, it is recommended to set a breakpoint on the following instruction. */ USART_SendData8(USART1, TxBuffer[T...

TIMER 1 channels in OC mode.

Hello! I'm learning to code an STMicroelectronics 8 bit micro-controller. I want to control a BLDC motor with this MCU for electric vehicle application. I'm using the STM8S DISCOVERY Board, based on the STM8S105C6T6 (48 pin) MCU. This MCU has 4 timer...

0690X00000AQLE6QAP.jpg 0690X00000AQLE1QAP.jpg
DebD21 by Associate
  • 1052 Views
  • 0 replies
  • 0 kudos

Weird bug in stm8 IAR compilers ?

Hi.I have faced a weird problem using IAR compilers.Errorstatus=0; Relay_Off; delay_ms(200); if(Errorstatus==1){ Errorflag=1;In this part of my code after I switch the relay off, I put a delay and if an interrupt...

Program the STM8 MCU(SWIM) using Nucleo-L152RE

I have Nucleo-L152RE board and I used this board to program the STM32 MCU using JTAG (CN4) connector. Now, I want to program the STM8 board using SWIM interface. So, is it possible with Nucleo-L152RE?. I already done the required changes to use Nucle...

AP_040 by Senior
  • 1796 Views
  • 6 replies
  • 0 kudos