Content originally posted in LPCWare by fjrg76 on Mon Nov 07 19:20:49 MST 2011
Quote: CodeRedSupport
What is your code doing? Examples of things that can affect your debug
connection, include:
- you have a watchdog running that is resetting the core
- you are changing clock speeds
- you are putting the core to sleep
EDIT: Please also provide your OS version. And, does your OS run as a virtual machine?
Hello Support and Zero
Let me start with a brief explanation of my code:
1. It's based in the freertos_lpc11xx example that I downloaded from your website.
2. This is the idle task, as shipped:
[FONT=Courier New]
void vApplicationIdleHook( void )
{
__WFI();
}
[/FONT]
3. It's running five simple tasks:
a) real time clock emulator,
b) toggle_led task, internally using vTaskDelay(),
c) external event counter task using P0.6 (EXTI). The character 'Z' is sent-out every 100 events
d) vApplicationTickHook(), which is running at 10ms
e) gpio_task() that toggles P0.1 every two seconds
f) echo_task(), which echoes a character received by the UART
I have not watchdog running.
I do not change clock speeds.
The only sleep mode the code uses is the same as the example includes.
OS version: WinXP 3SP, running in real mode (no virtual machine).
This little application uses printf() and RedLib none library, and one FreeRTOS' semaphore.
A thing that I forgot to mention is that when the frecuency of external pulses in P0.6 (see point 3-c
above) is bigger than 1Khz the whole system crashes, IDE included. Well, it doesn't crash at all, but let
see these:
IDE
-- Error Reported by target
-- Target reported errors
--- Reason:
--- 15: Target error from Read Memory
Processor
-- It goes to HardFault_Handler()
This is the stack:
[B]************************************************
freertos_lpc11xx (Debug) [C/C++ MCU Application]
MCU GDB Debugger (07/11/11 18:51) (Suspended)
Thread [1] (Suspended: Signal 'SIGSTOP' received. Description: Stopped (signal).)
5 HardFault_Handler() cr_startup_lpc11.c:284 0x000000d8
4 <signal handler called>() 0xfffffff9
3 xQueueGenericReceive() queue.c:819 0x00000cca
2 rtc_task() main.c:733 0x000005a6
1 <symbol is not available> 0x00000000
arm-none-eabi-gdb (07/11/11 18:51)
C:\example_lpc1114_ws\freertos_lpc11xx\Debug\freertos_111x.axf (07/11/11 18:51)
************************************************[/B]
Although it seems to be a FreeRTOS issue I still don't understand why the tool lost the connection. Right now I'm not very confident because I need to count external pulses with higher frecuencies (100KHz), and this behaviour freaks me out.
Zero: I'm not shure about the vectors, 'cause I haven't touched them. Do I need to relocate them?
I hope all this information is helpful. If not, please let me know it.
Thank you in advance for your kind support.