Questions tagged [stm8]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

STM8S005K6 - I2C (Bus always busy)

This question has already be posted but i don't find a solution of my problem. I have an LCD screen (MC20805A6W-BMLW-V2) with I2C communication and I try to communicate with my controller via I2C (...
0
votes
1answer
56 views

Translate from AVR pgm_read_byte to normal C array manipulation in STM8

I am trying to translate a couple of lines of code from AVR space data to STM8 normal C data manipulation. As you should know, AVR has a program space which can storage data for read only operation, ...
-2
votes
0answers
40 views

timer as a counter for one second led toggle in stm8l

Can anyone explain how this calculation works in this timer configuration. I am using stm8l-discovery board and when I see the waveform, i get a graph of 1s for one complete on-off cycle. ...
1
vote
0answers
340 views

STM8S - Connect to ADXL345 Acceleration Sensor via Hardware SPI

After software SPI didn't work out I am now trying to connect to the ADXL345 acceleration sensor via hardware SPI of the STM8S103F3. But, of course, problems appeared again, why not. This is my SPI-...
1
vote
1answer
53 views

STM8 TIM2 interrupt not taking place. What am I missing?

I've just started using STM8 microcontrollers, specifically the STM8S003F3P6 chip, in my own custom test board. The board works and I am able to blink an LED on PA3 without using an interrupt. However,...
22
votes
10answers
7k views

STM Microcontroller burns every time

I have some experience working with stm32 but I only ever used them on dev boards. I recently tried to solder stm32 and stm8 on a simple break-out board and program them with my st-linkv2 clone. On ...
-2
votes
2answers
307 views

How to get STM8 unique device ID?

I'm working with a STM8S003F3P6 microcontroller and I need to know an unique ID for each device I will use. I know that PIC microcontrollers has an unique device ID that can be acessed by the user. My ...
1
vote
1answer
46 views

A question about the Clock control register high of I2C bus

While reading the part about I2C bus of reference manual of STM8L MCUs, I found that there is this register named Clock control register high (I2C_CCRH). Its 6-th bit, referred as "DUTY", can be used ...
0
votes
1answer
35 views

Unable to resolve ADC conversion error in stm8s105s6

I'm trying to learn ADC on stm8s105s6. But not getting proper adc result. I shorted VCC to analog pin 3 and expected conversion value near 1023 as stm8 has a 10 ...
0
votes
1answer
65 views

STM32/STM8: How do I come from evaluation board to my design? [closed]

I'm a kind of a newbie to STM32/STM8 controllers. All my experience was with 8051, PIC and AVR controllers. And the typical development chain was like this: Make PCB Debug this PCB with my program. ...
0
votes
1answer
853 views

STM8 SWIM interface connection problem

I am trying to connect STM8L052C6T6 microcontroller using SWIM interface (STM8 port) on ST-Link/V2 programmer and it just doesn't connect. Power comes from outside power source (target is powered) ...
0
votes
2answers
98 views

RTC time advancing

I'm working in some projects with an RTC. I'm using the PCF85063A. The problem is: the RTC counter is advancing from real time about 2 minutes per week. I searched for hardware and firmware errors, ...
1
vote
1answer
64 views

How to power STM8(S105C4) chip? Is decoupling needed?

I have a MCU STM8(S105C4) with which I need to design a PCB to power from a USB. But I don't know how to power it. I've tried searching the specification for this MCU but all that I could find is that ...
1
vote
0answers
69 views

Problem with SPI communication with MAX31855K from STM8S103F3

I am trying to read temperature data from MAX31855K over SPI, using STM8S103F3 on a breakout board. Development set up is STVD, STVP and Consmic compiler. And using STM8S Standard Peripheral library. ...
1
vote
1answer
799 views

How to use TIMER 2 as simple counter in STM8S103F3?

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 in each ...
0
votes
1answer
59 views

Could STM32 Discovery boards debug STM8 chip?

I know that STM32 discovery boards could debug another STM32 chip. But could it debug STM8 chip too? Is STM8's debugging interface compatible with SWD?
0
votes
4answers
188 views

Sensing +12V signal using ST STM8AF5288 microcontroller digital input [duplicate]

I am using an ST STM8AF5288 microcontroller powered by 5V in one of my projects (STM8AF5288 home, datasheet). Is it possible to directly sense a +12V signal input by port pins? I am using a current ...
3
votes
2answers
1k views

What is STM8 hardware and software interrupt latency?

Just have a first look over the STM8 lineup to compare its performance to AVR which is well know for me now. One of my the big complain to AVR was the slow reaction to interrupts especially in C ...
1
vote
1answer
4k views

UART receive is not working in STM8S

I am new to stm8 (stm8s003f3p) I have done following code but could not able to find what is wrong with it. UART transmit is working but couldn't able to receive anything. ...
3
votes
1answer
7k views

How to flash protected STM8 MCU?

I would like to flash a new firmware on my STM8L15xC8. I have ST Visual Programmer (STVP) installed and can successfully flash the MCU of the STM8 Discovery board. Now, I setup the STM8 Discovery ...
3
votes
0answers
328 views

STM8 nested interrupt bug, not described in current errata sheet ES019

If main process execute WFI with AL bit set in CFG_GCR, changing I1/I0 priority bits in the ISR cause CPU stalled when nested IRQ occured. Preconditions: all ITC_SPR1 registers has default value 0xFF....
1
vote
0answers
486 views

Can I generate two PWM with 90°phase shift from stm8 microcontroller?

I am using stm8 microcontroller(STM8AF288) to generate a PWM of 1KHz frequency with timer-1(16bit) . I am giving this as input to a circuit, which generates two PWMs with 90° phase shift. But ...
2
votes
3answers
2k views

What does “Low density device” mean? About STM8 / STM32

STM32 and STM8 devices have some types: Low density devices Medium density devices High density devices About what "density" mean? About quantity of periphery or about quantity of flash or something ...
2
votes
1answer
957 views

Is it possible to communicate single SPI slave with Two SPI masters

I am using two STM8 micro-controllers as SPI masters. Master-1 is configured in full duplex mode. And the Master-2 is configured ...
1
vote
1answer
750 views

Is there _delay_ms() active waiting in SDCC+STM8 MCU?

Is there _delay_ms() active waiting function in SDCC for STM8 MCU? (I only found delay100tcy() for pic16 in includes) If it doesn't exist, what is the simplest implementation? FCPU macro is known.
1
vote
0answers
144 views

Can I use GPIOs to bit-bang in SENT protocol

I want to use a STM8 controller for a project(as I am familiar with micro).This controller gets the data from sensor and process it and sends data to another ...
0
votes
1answer
4k views

stm8s I2C Communication [closed]

I want to use I2C Communication between two stm8s208cb MCUs. I use stm8s standard peripharel library. My code: Master: ...
0
votes
1answer
1k views

STM8S ADC Always Reading 3.3v

I've just gotten into STM8 programming and am trying to figure out how to read voltages with its ADC. This was one of my first forays into embedded C programming, so "nooby" code mistakes aren't ...
2
votes
2answers
1k views

Controller area network received message filtering mechanism

I am working on some CAN communication project which allows us to control some external device attached to one node from some other node. The CAN bus is a broadcast network and hence a message sent by ...
2
votes
2answers
1k views

STM8L Timer 1 unexpectedly low overflow frequency

I'm running the MCU off the high speed (16MHz, confirmed) internal oscillator and I've configured timer 1 to overflow with maximum overflow frequency: ...
0
votes
2answers
356 views

ADXL345 acceleration data readout looks strange - STM8

after finally finding out how to create a software SPI connection i now can successfully read the data from an ADXL345 acceleration sensor. But they look rather strange to me, this are some sample ...
1
vote
1answer
381 views

Read / Write an acceleration sensor (ADXL345) with STM8

i bought a small board with an acceleration sensor (ADXL345) on it and now i try to write my functions to communicate with the IC. I use an STM8S103F3P6 as controller and ST Visual Develop as IDE. So ...
1
vote
1answer
2k views

How to count using Interrupts

I have an issue where I want to count how many times I hit a switch using an interrupt. I tried placing the count variable inside the main but it claims that count does not exist. I put count inside ...
1
vote
1answer
1k views

STM8S I2C Master Missing ACK

I use I2C communication with two stm8s boards. My master code: ...
0
votes
1answer
796 views

Arduino and STM8 I2C Communication

I want to I2C communication stm8s(slave) and arduino uno(master), but it does not work. Arduino Uno(master) code: ...
1
vote
1answer
1k views

SPI Read Function of STM8S

I am converting arduino-nrf905 library for stm8s. There is one spi function on the arduino library, it is SPI.Transfer(uint8_t reg). This function can write and read spi. But, there is two function on ...
1
vote
1answer
4k views

IAR STM8 delay function

i was wondering how i could write a delay function in the STM8 - IAR Embedded Workbench? I used the search-function inside the IDE, so i found the "__delay()" function but if i try to use it i get: "...
0
votes
1answer
1k views

IAR STM8 LED Pin On/Off Flash

i tried to flash the LED of this controller: http://www.cnx-software.com/2015/01/18/one-dollar-development-board/ (as you can see, there is a led connected to PD3) with this code: http://pastebin....
1
vote
1answer
1k views

Trouble with STM8S003F3 flashing

Could STM32S003F3 be flashed with SWIM interface only (SWIM, RST, VCC, GND, bare IC without any other elements)? I'm trying to flash it with ST-LINK/V2 and last version of IAR (Kickstart) and debugger ...
-2
votes
2answers
1k views