Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
58 views

I am porting the GetCurrentMicro function in the Arduino Core STM8 to my SDCC code and I noticed the Cosmic C Compiler _asm function allows me to return a result as well as an input in a C var. Is ...
Jonas's user avatar
  • 1,239
2 votes
0 answers
113 views

I've been working on a IR based light controller using STM8S microcontroller. Using this blog as reference text I've got the IR to work on pin PA1, according to my use case. The issue I'm facing is ...
Rohan Srinivasan's user avatar
1 vote
1 answer
65 views

Timer error 1 in STM8S003F3P I am writing code to create overflow 1s = Timer 1 to reduce the remaining_sec variable from 60 to 1. But the Timer often hangs for a while at random times. For example, ...
thanh cong's user avatar
1 vote
1 answer
51 views

I have been working with the STM8L152R8 development board, but it does not seem to let me blink LD2 (which should be mapped to PB5) or really change any value at all. Here is my code. Thanks! #include ...
Caleb Faulkner's user avatar
0 votes
2 answers
243 views

I'm trying to work make SWIM activation sequence for STM8 by external microcontroller of another company. I use timing diagram from UM0470 In phase 4 STM8 should respond to host by keeping swim pin ...
Markus Klein's user avatar
2 votes
0 answers
61 views

I am writing some firmware for an STM8S, and I want to have my SPI transmissions and receptions be handled in an ISR rather than polling. According to pg. 284 of the reference manual, I should be ...
samcns's user avatar
  • 49
1 vote
1 answer
449 views

I'm new to STM8 programming and I'm using the STM8S/A Standard peripheral library without importing it, that is, copying and pasting the files into my src and inc folders, which I don't think is the ...
Bruno Alexandre Fraga's user avatar
1 vote
1 answer
278 views

I am using STVD IDE to write code for STM8 the compiler I am using is Cosmic STM8 C compiler and the standard peripheral library provided for STM8. The problem I have is while evaluating an if ...
Amgad Bassam's user avatar
1 vote
0 answers
153 views

stm8l151k4 mcu rtc external crystal works stably but returns error when I want to write calibration value. "RTC_SmoothCalibConfig(RTC_SmoothCalibPeriod_32sec, RTC_SmoothCalibPlusPulses_Reset,50);&...
Habip's user avatar
  • 11
1 vote
1 answer
263 views

I am currently trying to write startup code in assembly for an STM8 without any vendor libraries. More specifically, I am using an STM8S103f3p6. I am still inexperienced in assembly and with startup ...
Alex's user avatar
  • 69
1 vote
0 answers
72 views

this doesn't work: TIM1_CCMR2 = 0b01; //its default input channel TIM1_IER = 0b100; //channel 2 capture interrupt TIM1_CCER2 = 0b1; //channel 2 capture TIM1_CR1 = 0b1; //start counter ...
John137's user avatar
  • 11
0 votes
0 answers
146 views

the code is using IAR High Level optimization with STM8L151G3, and I observed some problems on the production unit. In each loop, the code will execute the code below: __IO uint8_t ColorSwapFlag = 0; ...
Travis Su's user avatar
  • 709
0 votes
1 answer
866 views

I want to program "Option Byte" on STM8S005k6 without stvp. I do it by programming its code on Option Byte area but this makes it write protected only, not read protected: void ...
sara's user avatar
  • 1
0 votes
1 answer
244 views

I am using STM8S Cosmic C compiler, and I am trying to configure tim2 for 350 µs (350 µs should be the pulse width). As per the reference manual, tim4 is a 16-bit with a prescaler factor of 32768. I ...
nyl's user avatar
  • 13
0 votes
1 answer
320 views

I am trying to learn some basic fw reverse engineering but I need some help. I am complete novice when it comes to asm but I do have some background on other languages. What does the following line do?...
FunkyAP's user avatar
  • 11
2 votes
1 answer
623 views

I'm an engineering student and for my bachelor thesis I use a 16 channel IO expander which communicates with I2C with a STM8S microcontroller. IDE: STVD (I set the correct ARF6 byte) IO-ex: PCA8575 -&...
Joerie's user avatar
  • 101
1 vote
1 answer
341 views

I'm trying to write a stm32 code in stm8. The problem is I can't find a SPI_Transmit function only SPI_SendData. I need this function to transmit an array through SPI. The stm32 SPI_transmit function ...
user avatar
0 votes
0 answers
123 views

I'm trying to send data through spi with the Stm8 controller. The problem is that I can't see anything happening on the oscilloscope (even the SPI clock doesn't show) on the pins 6 and 5 with this ...
user avatar
2 votes
2 answers
188 views

I tried to program this code on an STM8 Controller: #include "Imagedata.h" void main(void) { unsigned char *pArray; pArray=IMAGE_DATA; while(pArray<=(IMAGE_DATA+(sizeof(...
user avatar
0 votes
0 answers
82 views

I'm trying to connect a raspberry pi 4B to a NUCLEO-8S208RB using serial communication connecting the device through tx/rx pins. Data sent from the STM board gets received by raspberry, but messages ...
Kingsley's user avatar
1 vote
1 answer
276 views

I'm using cosmic compiler for stm8 microcontroller. It supports "@" pointers or modifiers. such like @<address> @far @near @tiny @interrupt @inline //etc.. Cosmic compiler user guide ...
Jeff Sim's user avatar
0 votes
1 answer
501 views

i want to do some rc5 transmitter project. i already have a circuit with a stm8s003 to send data and a ne555 to make 38khz frequency. with connect them together and send the specific data my rc5 ...
ShahabBidi's user avatar
1 vote
1 answer
298 views

I'm developing a program using COSMIC 'C' compiler Ver 4.5.3 for STM8 CPU (STM8S003K3) and I want fill the MCU EEPROM with default values during mass production using ST-LINK/V2 device. In the Manual ...
Ferrari's user avatar
  • 75
-1 votes
1 answer
212 views

I am getting this error when using atomthreads in cosmic c for stm8L151c6 micro controller. clnk - symbol _archFirstThreadRestore not defined (Debug\atomkernel.o) Ifound out that ...
NINJA's user avatar
  • 119
1 vote
2 answers
976 views

I have build a prototype board with a STM8L, and I want it to be used and configured as a SPI slave. I am testing it with a raspberry pi as master. I use the lib provided by ST called "STM8 ...
Matio's user avatar
  • 33
1 vote
2 answers
339 views

I recently got a STM8 MCU and it has the built in function LCD_GLASS_DisplayString("STRING") The problem with that function is, as you can see below, that I cannot directly display an ...
rajeev's user avatar
  • 37
1 vote
0 answers
175 views

I make the program for STM8L151G6 on IAR Embedded Workbench for STM8 (version 3.11.1) I need to place the instruction JPF 0xf000 at 0x008426 address. I do this. In C code: __root static const uint8_t ...
Ivan167's user avatar
  • 11
0 votes
1 answer
914 views

STM8, IAR compiler. Im trying to place changable interrupt vector table(IVT) in RAM(ram_ivt_section or RAM_IVT), stating from 0x00 address. Prereq: Hardware entry point(base_ivt_section or IVT_TO_RAM ...
user avatar
0 votes
1 answer
225 views

I'm using SDCC to compile for a STM8 microcontroller. Compiling the following file results in a seemingly unnecessary div instruction - which is very slow on the STM8. char a[1]; char b; void foo() ...
user2248702's user avatar
  • 3,068
0 votes
1 answer
2k views

I want a main routine that runs continually but can be interrupted. I am at a loss as to how to get the UART or ADC interrupt to work properly. They only behave as expected if my main loop has wait-...
manny's user avatar
  • 1
0 votes
1 answer
585 views

I am programming a STM8S103F3 to TX on UART via interrupt. I understand a write to DR after "Transmit data register empty interrupt" will start another TX, so I have this in my ISR. But it ...
manny's user avatar
  • 1
1 vote
1 answer
3k views

I have a 600W digital step up converter with broken STM8S103K3T6C and another that is currently working OK. Is there a way to copy (dump) firmware from the working one and upload it to the new chip. ...
Alex's user avatar
  • 11
0 votes
1 answer
544 views

I am writing a firmware for stm8 with Cosmic compiler and in ST Visual Develop. I am using astruct as the following: typedef enum { lcBlack = 0, lcRed, lcGreen, lcOrange } led_color_t; ...
vouria's user avatar
  • 35
0 votes
1 answer
453 views

I am using Waveshare 1.54" ePaper Module. Using SPI peripheral: CPU freq is 16Mhz SPI Prescaler DIV by 8 MSB FIRST CPOL=0, CPHA=1 The Display does not response but it respond with TI CC1310 ...
Naman Shandilya's user avatar
0 votes
3 answers
1k views

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 ...
Ilidam's user avatar
  • 73
1 vote
0 answers
79 views

I have a discovery stm8s003k board and when I tested a program for cco capability it seems cco will never be stable and program always remain in line: while(CLK_GetFlagStatus(CLK_FLAG_CCORDY) == FALSE)...
amirsaeedkhan166's user avatar
-1 votes
1 answer
447 views

I created a program on STM8S103F3 to generate a delay in the range of microseconds using the TIM2 module, but the timer is not ticking as expected, and when I tried to call a 5-second delay using it, ...
rahul_T_T's user avatar
  • 133
1 vote
1 answer
2k views

I had tested reading Mifare RFID 1K cards with an RFID-RC522 module via UART using a Pyhton script on my PC. Now I am using STM8S103F3 to interface with the same RFID-RC522 (MFRC522) via SPI, but I ...
koko's user avatar
  • 11
0 votes
1 answer
824 views

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 ...
Ghedim's user avatar
  • 1
0 votes
1 answer
750 views

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 &...
blippy's user avatar
  • 1,540
1 vote
0 answers
263 views

On a STM8S, using the config files, on one hand I have (stm8s.h file) typedef enum {RESET = 0, SET = !RESET} FlagStatus, ITStatus, BitStatus, BitAction; and, in one of my functions (fonctions.c file),...
EPikk's user avatar
  • 11
-1 votes
1 answer
248 views

I want to know how i can declare any RAM variable as volatile in STM8 assembly language. I have one variable, which is shared between ISR and main function. It is causing issue during updates, when ...
Hitesh Kumar Tiwari's user avatar
1 vote
2 answers
145 views

The documents say that we can flash custom firmware on this module but it doesn't say how. I am unable to locate any build tool chain either. I tried raising a customer support ticket with STM and ...
Gautham Ranganathan's user avatar
0 votes
1 answer
314 views

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 ...
Ilidam's user avatar
  • 73
0 votes
2 answers
2k views

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. ...
cameroony's user avatar
0 votes
1 answer
2k views

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 ...
Ghedim's user avatar
  • 1
0 votes
1 answer
278 views

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 ...
Hitesh Kumar Tiwari's user avatar
0 votes
1 answer
622 views

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" ...
Hitesh Kumar Tiwari's user avatar
0 votes
2 answers
600 views

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 ...
Pet's user avatar
  • 1
1 vote
0 answers
356 views

My question has to do with how STM8 microcontrollers address things. Maybe Im missing something, I wrote a small program where the problem exists. The weird thing is that its different on my computer ...
cameroony's user avatar