2019-06-25 08:35 AM
STM32F30f4 Does this in debug mode or release with and without STLINK attached via SWCLK Pin 20,SWDIO Pin 19,NRST Pin 4.
Using HSI clock and PLL , but tried also without PLL. I've only enabled IO on the standard IO lines available, PA0 -> PA7 Pin 6 to Pin 13, PB1 Pin 14, Pf0 Pin 2,PF1 Pin 3, PA9 Pin 17, PA10 Pin 18.
Runs in debug OK for fixed number of cycles then locks in system memory, looping at 0x1ffffed68. The only enabled services are SysTick, Penable request for system service and system service call via SWI instruction, NMI and hardfault interrupt. All set to defaults.
I'm using IAR EWB for ARM 7.80.04.1295, shared component 7.5.6.4719.
Anyone come across this?
Solved! Go to Solution.
2019-06-26 08:32 AM
Problem solved. Boot0 pin was high, booting from SRAM instead of Main flash memory, into the boot loader. At some point the code presumably times out in this boot mode and doesn't interrupt.
2019-06-26 06:46 AM
I meant to type STM32F030f4 , cortex 0 series. 20 pin TSSOP.
2019-06-26 07:07 AM
How many cycles exactly?
What are you doing with the BOOT0 pin? Pulling it down?
Seem to recall some startup code where it explicitly maps FLASH into the zero address space. SYSCFG?
2019-06-26 08:32 AM
Problem solved. Boot0 pin was high, booting from SRAM instead of Main flash memory, into the boot loader. At some point the code presumably times out in this boot mode and doesn't interrupt.
2019-06-26 10:35 AM
>>doesn't interrupt.
Well the CM0 doesn't provide for a relocatable vector table, it always points at the zero memory region, and whatever is mapped there. If you want FLASH code to run and interrupt, you'll need to make sure the memory is suitably mapped (shadowed).
https://www.st.com/resource/en/reference_manual/dm00091010.pdf
See SYSCFG_CFGR1 MEM_MODE = 0