Re: STM32F4Discovery USART3 problem
Posted: Thu Mar 08, 2012 2:15 am
Giovani
my SPI driver is disabled, debugger is on, I do not see any DMA conflict.
I reviewed the code and found error in my Atollic project - I forgot to correct the DMA mask in the hal_lld.h. Now both IDEs, CrossWorks and Atollic generate the same error - _unhandled_exception().
I tracked down the execution of the DMA interrupt with the debugger and found a problem in the call _port_exit_from_isr(). Here is a snipped of my disassembled code
_port_switch_from_isr:
08000470: bl 0x80008f0 <chSchDoReschedule>
08000474: svc 0 <----- _port_exit_from_isr jumps here
08000476: nop
08000478: nop.w
0800047c: nop.w
SVCallVector:
08000480: mrs r3, PSP
08000484: adds r3, #32
08000486: msr PSP, r3
0800048a: movs r3, #0
0800048c: msr BASEPRI, r3
08000490: bx lr <---- return into _idle_thread followed with _unhandled exception
For me a bit mystery, how the linker knows, that the _port_exit_from_isr should continue into SVCallVector? Is this as designed?
my SPI driver is disabled, debugger is on, I do not see any DMA conflict.
I reviewed the code and found error in my Atollic project - I forgot to correct the DMA mask in the hal_lld.h. Now both IDEs, CrossWorks and Atollic generate the same error - _unhandled_exception().
I tracked down the execution of the DMA interrupt with the debugger and found a problem in the call _port_exit_from_isr(). Here is a snipped of my disassembled code
_port_switch_from_isr:
08000470: bl 0x80008f0 <chSchDoReschedule>
08000474: svc 0 <----- _port_exit_from_isr jumps here
08000476: nop
08000478: nop.w
0800047c: nop.w
SVCallVector:
08000480: mrs r3, PSP
08000484: adds r3, #32
08000486: msr PSP, r3
0800048a: movs r3, #0
0800048c: msr BASEPRI, r3
08000490: bx lr <---- return into _idle_thread followed with _unhandled exception
For me a bit mystery, how the linker knows, that the _port_exit_from_isr should continue into SVCallVector? Is this as designed?