cancel
Showing results for 
Search instead for 
Did you mean: 

Failure to launch

longTimer
Associate II
Posted on September 06, 2011 at 21:27

Hi,

I just received a new board (new design, just powered) that is using an STM32F102C6 processor. The tools are IAR 6.21 for development and a J-Link-ARM for JTAG.

The sample startup code from IAR (which uses the standard peripheral library V2.0.1from ST) is setting the Base address for the RCC peripheral to 0x40021000 which seems correct. In debug mode, the peripheral library uses a structure to overlay the RCC registers. The pointer to the structure seems correct as stated. However, the Watch listing in IAR shows all zeros for the RCC registers.

As expected, the HSIRDY bit is never found and the ClkInit() function hangs.

The download to flash seems to work correctly, the debugger breaks at the main() function, and the program can be stepped.

 

What could be happening that could create these symptoms? It's as though the peripheral registers are located somewhere else.

Thanks in advance for for answers, more questions, or even suggested targeted reading.

Dave

  

 

  

#wrong-ahb-id-answer
1 REPLY 1
longTimer
Associate II
Posted on September 07, 2011 at 15:41

Nevermind.

I am going to post the solution here so others can find it.

1. I tried to switch a preliminary project on a development board to a new processor/board and got the following error.

Wrong AHB ID (15:3). Expected 0x04770001 (Mask 0x0FFFFF0F), Found 0x00000007

2. I then started a new project from scratch and selected the correct processor and it appeared to work, except...  The project was so small that the box that displayed loading the 'Simulator' debugger was flashing past so fast that I could not read it, I just assumed the processor was being loaded.  That explains the missing peripheral data.

3. No one told me that the JTAG interface was a reduced pin count style and required the SWD setting in the Debugger->J-Link configuration! That was what was producing the Wrong AHB ID error.

I hope this helps someone else.

Dave