2020-09-19 7:12 AM
I am trying to implement the "Delay" function from timing_delay.h / timing_delay.c that comes with STM8 example code. In order for the delay to work, you need to add the function "TimingDelay_decrement" to stm8l15x_it.c in order to decrement the timer (or it will go on forever).
You can only have one of the following files in a project without it breaking, either "stm8_interrupt_vector.c" or "stm8l15x_it.c". Everytime I build my code, stm8_interrupt_vector.c gets added to my project and breaks the build, despite the file not even existing at this point (removed any trace of it).
1) first and foremost, I really just want a delay function that works in my code.
2) second most I would not mind imeplementing the decrement function inside stm8_interrupt_vector.c, however I do not know how to do it.
3) lastly, I would like to figure out how to remove stm8_interrupt_vector.c from my project for good.
any of these three will do the trick I believe.
2025-04-17 2:49 AM
Hello Sir ,
for delay Function in STM8S refer below Document
https://boseji.com/posts/stm8-precise-cycle-delay/
in this writer created a delay_cycles function and called it wherever he wants to implement delay.
Note: pass bigger number than 1000 so that you will get more delay
For the stm8_interrupt_vector.c file follow below step in STVD IDE
1. Right Click on stm8_interrupt_vector.c then go to the Setting then on top right side Click on "Exclude file from Build" and the rebuild your code .
Thank You.