2014-07-28 01:01 PM
�My hardware guy� bought 2 Olimex H-405 boards. (He wanted 64-pin QFP.) Code loads and runs using an external ST-LINK/V2 and its 20-pin cable. Or rather runs some then freezes.
After setting SysClk to 168 MHz then setting RCC_APB1ENR worked okay but when setting RCC_APB1ENR two instructions later the debugger froze. I got much the same effect setting both of those and other RCC_xxxENR settings before setting SysClk to 168 MHz. But this time it froze after setting SW=2. (Done with strb to the low byte of RCC_CFGR. HPRE was never anything other than zero.)Yet on my STM32F407 Discovery board it works just fine either way. Any ideas? #st32f4052014-07-28 01:24 PM
Generally, I'd try to avoid accessing peripheral registers in a partial fashion, it's not like writing a byte is more efficient than writing a word.
You should be able to check what peripheral units are present by setting all the bits high, and seeing which stick. For example you wouldn't expect the Ethernet peripheral to enable on a 405