cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F30f4, standard cube configured out of the box software locks up after fixed number of processor cycles. IO looks to resets also. Loops in system memory starting at 0x1ffffed68. Only if sysTick is enabled. Does not get to sysTick interrupt.

PKnel
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
PKnel
Associate II

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.

View solution in original post

4 REPLIES 4
PKnel
Associate II

I meant to type ​STM32F030f4 , cortex 0 series. 20 pin TSSOP.

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?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
PKnel
Associate II

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.

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..