David Brownell wrote:
>>> If that's part of the issue, you might be able to
>>> work around it by updating DEMCR before shutting
>>> down. "cortex_m3 vector_catch none" maybe.
>> Well, it helps a bit. Adding "CoreDebug->DEMCR = 0;" to the start of my
>> program does the same.
>
> To clarify: it behaves fine after adding that line,
> no wierdness?
Not really - I still have to do one additional system reset using the
push-button. But it's way better than having to power-cycle for my
application.
> You should *NOT* need to do that.
I know. I only needed a quick solution today, and can wait for a better
bug fix.
> Another question of course is what's triggering the
> hard fault. Do you know that yet?
Yes! I'm doing it on purpose, just to test my fault handler code - I
need to switch off some PWM channels immediately in case of a fault.
Joseph Yiu suggested this code to cause a hard-fault:
__asm(
"movs r0, #1 \t\n" // unaligned ..
"ldm r0, {r1-r2} \t\n" // .. load-multiple
"bx lr \t\n"
);
(see http://www.st.com/mcu/forums-cat-6778-23.html)
best regards,
Thomas!
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development