cancel
Showing results for 
Search instead for 
Did you mean: 

st-link + IAR debugger

bart2399
Associate II
Posted on June 29, 2010 at 18:05

st-link + IAR debugger

4 REPLIES 4
picguy2
Associate II
Posted on May 17, 2011 at 13:56

Check processor speed setting and  flash wait states.  One PCB gave all zeros in flash @72 MHz no wait states.  Same code another PCB kinda - sorta worked.  'Twaz very confising.  Used two wait states as docs said.  Both worked.

bart2399
Associate II
Posted on May 17, 2011 at 13:56

how do you set speed/flash wait states?

in the IAR IDE the st-link has no options at all.

picguy2
Associate II
Posted on May 17, 2011 at 13:56

Earlier you said

>it's an STM32F107VCT6 chip on a stm32f107vc-sk development board from IAR

Use unmodified IAR demo code for this PCB.

Or, if you are like me, RTFM (Read The Fine Manual) on clock tree and flash setup registers.  Note the following from page 48:

zero wait state, if 0 < SYSCLK ≤ 24 MHz

one wait state, if 24 MHz < SYSCLK ≤ 48 MHz

two wait states, if 48 MHz < SYSCLK ≤ 72 MHz

The linker itself knows nothing about the above.  It has to work on non-ST parts.

bart2399
Associate II
Posted on May 17, 2011 at 13:56

i'm already using two waitstates

i'm using ST's ''MCD'' library funtions for setting up clocks etc.

anyhow, i don't think something is misconfigured in the microcontroller, J-Link is able to read the flash.