This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problems with debugger and enable PLLs

Other Parts Discussed in Thread: AM1808

I use TMDXEVM1808L board with the Blackhawk USB100v2 emulator. Board Support Library contains many examples which load code into internal SRAM and then loaded code changes PLL settings:

 

#if NO_GEL

   EVMAM1808_init();

   EVMAM1808_initRAM();

#endif

 

The functions work properly. But I want to load my code into external DDR memory through JTAG, so I have to enable mDDR in GEL. AM1808.gel has commented function

 

/* Core_300MHz_mDDR_132MHz(); */

 

I uncommented this string and then got the message during loading my code:

 

ARM9_0: Output:     Memory Map Cleared.

ARM9_0: Output:     ---------------------------------------------

ARM9_0: Output:     Memory Map Setup Complete.

ARM9_0: Output:     ---------------------------------------------

ARM9_0: Output:     Enabling Full EVM PSCs...

ARM9_0: Output:     PSC Enable Complete.

ARM9_0: Output:     ---------------------------------------------

ARM9_0: GEL: Error while executing OnTargetConnect(): Target failed to write memory at 0x01C11138.

ARM9_0: File Loader: Data verification failed at address 0xC000C000 Please verify target memory and memory map.

 

The problem occurs when GEL is trying to execute this string:

/*Set the GOSET bit in PLLCMD to 1 to initiate a new divider transition.*/

   PLL0_PLLCMD |= 0x1;

 

Now I’m using only “Set_mDDR_132MHz();” in the GEL and then “EVMAM1808_init();” function without touching PLL1 in my C code. It works, but I can see warning message “ARM9_0: Warning: 0x60000060/-1029 @ marker 11103 Error during: Execution, Initialization,  The ICECrusher register scan returned invalid data“ in debugger console.

 

If I try to change PLL settings in C code like this:

 

   SYSCONFIG->KICKR[0] = KICK0R_UNLOCK;

   SYSCONFIG->KICKR[1] = KICK1R_UNLOCK;

   config_pll0(0,4,1,0,1,11,5);

   config_pll1(4,1,0,1,2);

 

debugger stops with error:

 

ARM9_0: Error: 0xA0002060/-242 @ marker 10825 Error during: Execution, Initialization, Control, 

ARM9_0: Warning: 0x60000060/-1029 @ marker 11103 Error during: Execution, Initialization,  The ICECrusher register scan returned invalid data

 

How to work with the PLLs and debugger properly?