time management stm32l discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-07-29 9: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
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-07-29 9: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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-07-30 5: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();
}
