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.
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.
>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.