Content originally posted in LPCWare by on Tue Feb 21 02:31:01 MST 2012
Quote:
My LPC1768 (also 1769 on lpcxpresso board) running FreeRTOS sometimes (10
minutes to 10 hours) freezes or reboots if WDT enabled.
That does not give enough information to allow a full reply. For example, how, where and how frequently is the watchdog being kicked?
If the watchdog is the thing that causes it to reboot (which is I think the purpose of the watchdog) and it runs fine without the watchdog, then it would seem the kicking of the watchdog is your problem.
Quote:
Thread [1] (Suspended: Signal 'SIGSTOP' received. Description: Stopped (signal).)
6 <symbol is not available> 0xfffffffe
5 <signal handler called>() 0xfffffff1
4 <symbol is not available> 0xfffffffe
3 <signal handler called>() 0xfffffffd
2 vPortStartFirstTask() port.c:153 0x000170e2
1 xPortStartScheduler() port.c:182 0x00017132
I should just ignore that stack frame if you are in an exception you need to unwind the stack in code to see what it really is.
Quote:
cmp r3, #0 is last instruction I see via debugger, it is just
That instruction is benign, I would look at the previous instruction, which is a load, and has more potential for exceptions (what is the address it is loading from?]
Quote:
Most likely is you are blowing the stack for one of your processes. The is no stack checking, so once you exceed the allocated stack size, you will be overwriting application data, or other stacks.
I think the OP said he had stack checking on, although that does not check the interrupt stack.
Quote:
One tiny task is used for IAP calls and other tasks use it a lot (through a queue). I forgot taskENTER_CRITICAL() / taskEXIT_CRITICAL() around one of IAP calls. "Heavy" tasks use it more often then others. 12 hours without glitches now.
That is good - although IAP is presumably going to be a long operation so will impact your system responsiveness.
Quote:
Is it OK to use __disable_irg() under FreeRTOS ? Or should I use taskENTER_CRITICAL() instead which also disables interrupts, but by setting priority mask equal to configMAX_SYSCALL_INTERRUPT_PRIORITY ?
That should be ok [B]provided [/B]it is not called from a FreeRTOS critical section.