system_LPC17xx.c error

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

system_LPC17xx.c error

980 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Thu Apr 15 05:12:41 MST 2010
I use LPCXpresso Build id: 2010-04-08 (v3.3.4) with LPC17xx.
I have a simple project with CMSISV1p30 LPC17xx library.
When start the debug with LPC-Link, if I have insert a break point in the library file system_LPC17xx.c the debugger goes in error:
15 : Target error from register access

Is possible to debug the code in the library ?

Thanks

Original Attachment has been moved to: 1100302_tftpboot.zip

0 项奖励
回复
4 回复数

844 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Thu Apr 15 07:43:28 MST 2010

Quote: CodeRedSupport
Yes, that would cause the problem you are seeing. The clock setup has started and it is not stable until the clock setup has finished. Until it is stable, the debugger will be unable to connect to the processor.

I suggest you read the LPC17 UM on clock setup and walk through the code manually.



OK, I have understand !
0 项奖励
回复

844 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Apr 15 07:28:55 MST 2010
Yes, that would cause the problem you are seeing. The clock setup has started and it is not stable until the clock setup has finished. Until it is stable, the debugger will be unable to connect to the processor.

I suggest you read the LPC17 UM on clock setup and walk through the code manually.
0 项奖励
回复

844 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by blasiis on Thu Apr 15 07:06:15 MST 2010
At the start of the SystemInit, my aim is to check the status of basic registers

void SystemInit (void)
{
#if (CLOCK_SETUP)                       /* Clock Setup                        */
  LPC_SC->SCS       = SCS_Val;
  if (SCS_Val & (1 << 5)) {             /* If Main Oscillator is enabled      */
    while ((LPC_SC->SCS & (1<<6)) == 0);/* Wait for Oscillator to be ready    */
  }

*********** HERE I HAVE INSERT TEH BREAK POINT *******
  LPC_SC->CCLKCFG   = CCLKCFG_Val;      /* Setup Clock Divider                */

  LPC_SC->PCLKSEL0  = PCLKSEL0_Val;     /* Peripheral Clock Selection         */
  LPC_SC->PCLKSEL1  = PCLKSEL1_Val;
0 项奖励
回复

844 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Thu Apr 15 05:49:07 MST 2010
You can, but you have to be very careful as this code is setting up clocks. If there isn't a stable clock, the debugger will not be able to connect to the chip (which sound exactly like what has happened. Where, exactly, did you set the breakpoint?
0 项奖励
回复