Loading...
 
Skip to main content

System Workbench for STM32


timer not working in added .C file

STM32F411re on a nucleoboard.

hello,
i have a problem with my timer 3, it think it have something to do with: including / linking.

i have added a stepper_manual.h file and a stepper_manual.c file in myn project.
in main.c i can used the timer to toggle a led.
but when i want to do it in stepper_manual.c file i get some errors: 'htim3' undeclared (first used in this function)
de compiler see the 2 added files.
i think i have to include something, but what and where ?
thanx in advance.

i have the problem solved.

in MX by project manager -> project -> generated files select the top option (generated the peripheral initializatin as a pair.....)
this wil make that the functions uart, time (an i think more if you used them) get his own .h &.c files
before the stood in main.c..

now i included tim.h in the stepper_manual.c file......and it works ๐Ÿ˜Š


i'm so sorry for my late reaction ๐Ÿ˜ก๐Ÿ˜ก๐Ÿ˜ก
your answer was correct, its working now.

thanks........sorry again ๐Ÿ˜ก


 
Collapse/expand modules below