I'm trying to delay a task but this seems to not work.
/* Infinite task displaying the state */
voidappLoop_LEDtask(void){DDRB=0xFF;while(true){PORTB=0xFF;taskDelayFromNow(3000);PORTB=0x00;taskDelayFromNow(3000);}}
I've tried to delay with _delay_ms() and _delay_loop_2() but that didn't work either. I removed the includes (they are removed entirely so they're not just commented out) but no chance. My leds are turned on and do not blink.
I set cfgUseDelay and includeTaskDelayFromNow to cfgTrue and the rest is from the config file of the minimal demo.
What's going wrong?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-11-20
The leds stay switched on.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to delay a task but this seems to not work.
I've tried to delay with _delay_ms() and _delay_loop_2() but that didn't work either. I removed the includes (they are removed entirely so they're not just commented out) but no chance. My leds are turned on and do not blink.
I set cfgUseDelay and includeTaskDelayFromNow to cfgTrue and the rest is from the config file of the minimal demo.
What's going wrong?
The leds stay switched on.
It looks ok, so there is probably something with the configuration.
Do you use the HelloWorld-setup? And Standard, not compact mode?
In the config file, check that you have something like this:
If you have other tasks with different priorities, check that no other task (with higher priority) have 100% runtime.
As dbkey says, start from the Hello-World example , the minimal demo configuration can not be used