2014-07-29 09:45 AM
Hi
I am working for
a project with
the
stm32ldiscovery
but
I have a problem
:
the Delay function
that
I implemented
in my program
is not working
void Delay(uint32_t nTime) {
TimingDelay = nTime; while (TimingDelay != 0); }void TimingDelay_Decrement(void) {
if (TimingDelay !=0x00) { TimingDelay--; } }Certainly
omit
some
initialization operation
necessary
for
its proper functioning
Can anyone
help me?
Thank you
.
2014-07-29 09:59 AM
Certainly
omit
some
initialization operation
necessary
for
its proper functioning
Can anyone
help me?
Thank you
.
So did you implement a SysTick interrupt calling the function, and configure the SysTick? The variable would need to be volatile, and the delay wouldn't be interrupt safe.
2014-07-30 05:27 AM
Hi clive1
, thanks for
your
interest
.
I solved the
problem.
I do not know
why in
the file
stm32l1xx_it.h
wascommented
the line of code
that did not allow
the operation of the
Delay function
.
practically
:
void SysTick_Handler(void){
//TimingDelay_Decrement();
}