This is the mail archive of the
ecos-bugs@sourceware.org
mailing list for the eCos project.
[Bug 1001143] Ecos crashes when using "nop" instead of "wfi"
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-bugs at ecos dot sourceware dot org
- Date: Fri, 4 Mar 2011 10:33:46 +0000
- Subject: [Bug 1001143] Ecos crashes when using "nop" instead of "wfi"
- Auto-submitted: auto-generated
- References: <bug-1001143-13@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001143
--- Comment #8 from Andreas Schwarz <aschwarz@unifire.ch> 2011-03-04 10:33:43 GMT ---
(In reply to comment #6)
Hi John
We had some problems to explain the error. Basically the device crashes under
heavy load or special circumstances like having to interrupts overlapping or
one with a busy loop in it.
Recently, Stanislav Meduna mentioned a bug in the mailing list regarding the
HAL_DISABLE_INTERRUPTS macro for Cortex-M3. The result of this macro in
Assembler is that the BASEPRI register is not changed.
We checked our Assembler code and found a lot of this faulty code:
f04f 0320 mov.w r3, #32
f3ef 8311 mrs r3, BASEPRI
4619 mov r1, r3
f381 8811 msr BASEPRI, r1
613b str r3, [r7, #16]
The solution is:
> # define HAL_DISABLE_INTERRUPTS(__old) \
> __asm__ volatile ( \
> "mrs %0, basepri \n" \
> "mov r1,%1 \n" \
> "msr basepri,r1 \n" \
> : "=r" (__old) \
> : "I" (CYGNUM_HAL_CORTEXM_PRIORITY_MAX)\
> : "r1" \
> );
As we fixed this, we were not able to reproduce this behavior any more.
I was looking for a bug report describing this fault. As there is still no bug
report: should I replay on the mailing list (02/16/11) or just add new one
based on our findings?
- Andreas
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.