Loading...
 
Skip to main content

System Workbench for STM32


ldmia instruction is causing an exception on Nucleo-F103RB board

Thank you, dautrevaux, for the quick answer.
Indeed, the problem was the alignment of the data. I forgot the LDM/STM instructions require the memory to be properly aligned.

My code is now like that:

ldr r0, =data
ldmia r0, {r4-r9}
....
....
.align 2
data: .word 0x4, 0x5, 0x6, 0x7, 0x8, 0x9
.end

 
Collapse/expand modules below