AnsweredAssumed Answered

Problem with generated code

Question asked by Burck.Steven on Mar 1, 2015
Latest reply on Mar 2, 2015 by Clive One
I've just started a project using the STM32F103VF.  I generated code using STM32CubeMX, and imported it into Rowley Crossworks (my toolkit). It converted, and loaded, but when I run the code, before I even get to my own user code, it gets a hard fault and dies.  The fault occurs in HAL_RCC_OscConfig, when setting the local variable tickstart to 0.  The assembler line  str.w r3, [r7, #0x3EC] causes the fault.  r3 contains 0, and r7 contains 0x1ffffed8.  Now, the address of tickstart is in fact 200002C4 (according to the debugger), and this is a legal SRAM address on the device, but is still causing a hard fault.  Any ideas?

Outcomes