Questions tagged [stm8]

The STM8 is an 8-bit microcontroller by STMicroelectronics.

76 questions
0
votes
3 answers

STM8 Pulse Counter

I am developing a control for a DC motor. This motor has an encoder that generates pulses according to its movement. I need to control the number of turns of the motor shaft by monitoring the number of pulses. I am using SMT8S103F3 for this…
Ilidam
  • 73
  • 6
0
votes
1 answer

UART issue for reading 2 bytes length

I am having an issue with the UART1 communication between two devices (Computer and a STM8S2 board). I implemented software in the computer that writes two bytes length of data to the STM8 • the first byte that acts as an identifier; •the second…
Ghedim
  • 1
  • 3
0
votes
1 answer

STM8 UART polling receive is mangles

I'm trying to connect to an STM8 using uart. The STM seems to transmit data OK, but what it receives seems to be mostly junk, and often seems to receive 2 bytes at once. Here's the code: #include "../stm8.h" // // Setup the system clock to run at…
blippy
  • 1,490
  • 1
  • 13
  • 22
0
votes
1 answer

STM8L051F3 GPIO Initial Config

I am programming the STM8L051F3 processor for a simple application in which it is only necessary to control all GPIO. The problem is that I can't control the GPIOC pin 0. I just configured the GPIO registers. Is any other startup necessary? I also…
Ilidam
  • 73
  • 6
0
votes
2 answers

stm8flash .bin file for EEPROM write

I am attempting to write values directly to the eeprom space on a stm8 micro controller. I don't want to write a program that does this that I flash onto the chip. But i want to write directly to it. The command to do this is in unix is…
cameroony
  • 67
  • 1
  • 10
0
votes
1 answer

Explanation about missing prototype error

I am getting the following error #error cpstm8 main.c missing prototype, but what I do not understand is the reason that I am receiving it, I declared the prototype of my function on the top and this error still keep happening, maybe I am missing…
Ghedim
  • 1
  • 3
0
votes
1 answer

How can i configure pins "PD6 and PD5" of controller "STM8S103F3" in low state (voltage level 0) in "input mode"

I am using "STM8S103F3" controller. When i am reading the voltage levels on the pins "PD6 and PD5" on startup (no external connection), using "IDR" registers, it is showing voltage level as 1 (5v). I want to know, how i can set the voltage level as…
0
votes
1 answer

How to verify memory checksum of the code in STM8S controller

I am using "STM8103F3" controller. I want to perform ROM test in my code, but i am unable to find the register, which can verify my "memory checksum". Memory checksum i can get my adding the "ROM" bytes, but i am facing issue how to verify that. Can…
0
votes
2 answers

STM8A CAN Filtering in Standard Peripheral Library

I am working with the STM8AF5286UDY and am trying to set up a CAN interface. For programming, I use the standard peripheral library. At the moment, my CAN interface works fine. The only thing, which does not work, is filtering. I use extended IDs…
Pet
  • 1
  • 1
0
votes
0 answers

Loading value directly in STM8S103F2 controller in the index register XL (Assembly language)

I am using STM8S103F2 controller in assembly language. I want to load directly value in "XL" index register in one instruction and i do not want to affect "XH" register. (Index "x" register is the combination of XH and XL). Other ways to load value…
0
votes
0 answers

Not able to define address space for CPU registers (Accumalator (A), index registers (XH and XL) in STM8S103F2 controller

In Assembly code, for STM8S103F2 controller, we can map the registers by the following syntax: Example: PA_ODR equ $5000 or Segment byte at 5000 'cpu' .PA_ODR DS.B 1 but when it will come for CPU registers, both the syntax will not work. A…
0
votes
0 answers

Read access out of stm8 address range error in st8s013f2 controller

I am using stm8s103f2p controller in simulator mode in ST visual studio (assembly language), and during compiling my one sample file, i am getting error "read access out of stm8 address range". Map file: BYTES ; The following addresses…
0
votes
0 answers

I2C is not able to start

I am using stm8s controller and SDCC compiler. I am interfacing SD130S7 I2C based RTC with controller. I am facing a problem during communication. I think the problem is I2C itself is not started. I am using a development board for STM8S103. I…
dev_eng
  • 126
  • 1
  • 12
0
votes
1 answer

I need to know why my interrupts are not working here

I am using stm8l - discovery and i have created a code for toggling a led for every 1 second using timer (TIM1) but this is not working properly. I am missing something here in my configuration I could enter the interrupt function for the first time…
Viswa5095
  • 1
  • 2
0
votes
2 answers

STM8S UART TX Interrupt Enable/Disable Issue

Thanks to everyone who gives an answer. But the problem is related to the compiler. I used Cosmos and STVD, it does not bind the interrupt function. When I immigrate the project to IAR, The problem is solved. I am dealing with STM8S103F3P6 IC. I…
Murat Hepeyiler
  • 430
  • 3
  • 12