Debugging problem when using internal OSC in LPC1768

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging problem when using internal OSC in LPC1768

1,043 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Simon Brouwer on Thu Mar 24 02:25:11 MST 2011
[LEFT]Hi,

I have a problem where I can't inspect arrays in RAM or view them in a memory monitor. In the last case I get a dialog saying "Add Memory Monitor Failed. Target request failed: Cannot access memory at address 0x1000042". In the status bar is shown "15: Target error from Read Memory: Ee(13). Timed out waiting for DP data".

Also if I hover the mouse over an array in RAM I get a dialog "Target reported errors. Reason: 15: Target error reading from memory".

However, I can use watch expressions on single variables and inspect single variables by hovering the mouse over them, and also I can use memory monitor on flash ROM.

I suspect it may have something to do with the fact that I am using the internal 4MHz oscillator of the LPC1768 and no PLL. In the debugger configurations I have set "Crystal (XTAL) frequency and PLL value" to 4000 (kHz).

Best regards
Simon Brouwer
[/LEFT]
0 Kudos
Reply
4 Replies

1,029 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 31 03:59:10 MST 2011
As a very quick experiment, I just commented the call to SystemInit() out in an LPC17 project, which should then cause the clock to be left running at the default 4MHz.

I don't see any problems with either the default debug launch configuration or after modifying "Crystal (XTAL) frequency and PLL value" to 4000.

I suspect that seeing you actual application (or a simple cut down version that shows up the problem) along with the actual CMSIS library/code you are linking with, is the next step.

Do a clean of both projects, then use [B][FONT=Courier New][SIZE=1]Quickstart -> Import and Export ->[/SIZE][/FONT][SIZE=1] Export projects to archive[/SIZE][/B]. Then attach to the thread.

Regards,
CodeRedSupport
0 Kudos
Reply

1,029 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Mar 31 03:58:10 MST 2011
Could you post your application (or a cut down version of it) that demonstrates the problem? It is very difficult to know exactly what you have done without having the code to reproduce it.

Thanks
0 Kudos
Reply

1,029 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Simon Brouwer on Thu Mar 31 03:17:31 MST 2011
To run the LPC1768 at the 4MHz from the internal RC clock I use a modified version of system_LPC17xx.c in which I changed the following definitions:

#define SCS_Val               0
#define CLKSRCSEL_Val         0
#define PLL0_SETUP            0
#define PLL1_SETUP            0
#define CCLKCFG_Val           0
#define FLASHCFG_Val          0

Also I commented out the body of SystemCoreClockUpdate().

It may seem odd to run an LPC1768 at such a low clock, but my reason to choose the LPC1768 for my application was not computing performance, but the fact that it has 64 kbyte RAM on-chip and very low idle current. In operation, I need low current consumption rather than speed.
0 Kudos
Reply

1,029 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 28 01:10:41 MST 2011
Can you confirm what you have actually done here. Have you just modified the launch configuration settings, or have you also modified the clock setup code in your application, as per:

http://support.code-red-tech.com/CodeRedWiki/LPC1xxxChangeClock

Regards,
CodeRedSupport
0 Kudos
Reply