I have a K20dx256 configured as an SPI slave generating an interrupt. (CW 10.5, MQX 4.1, Freescale tools)
All the SPI ISR does is get the data, set an event and reset the SPI interrupt registers. This has been working for over a year with no issues.
-Now, when I ramp up the SPI interrupts to over a few Khz the system crashes over time, hanging the debugger in the _mqx_idle_task() or in __boot().
-Debugging shows no stack overflow issues and no errors, there are 3 tasks running.
-I have my BSP_DEFAULT_IO_CHANNEL set to "iodebug:" and BSPCFG_ENABLE_IODEBUG set to true. I can see printf()s on my console.
-In the code I run --> _int_install_unexpected_isr(); and _int_install_exception_isr(); which I understand will print some useful information to the console when I crash.
-My problem (besides the crash) is I see nothing printed to the console when I CRASH, no clues as to what is happening. The debugger stops in _mqx_idle_task() or in __boot.
Any help getting CRASH information printed to my console or help figuring out what is causing my CRASH will be much appreciated.
Thanks in advance,
TJ
Oh No, I'm looking at the MQX RM: I think this means I cannot use the "iodebug:" to view unexpected isr stuff.
Am I correct?
----------------------------------------------------------------------------------------------------------------
2.1.49 _int_unexpected_isr
CAUTION
Since the ISR uses printf() to display information to the default I/O channel,
default I/O must not be on a channel that uses interrupt-driven I/O or the
debugger.
----------------------------------------------------------------------------------------------------------------
Hi Tom,
Are you using a Freescale board?
Best Regards
Sol
Hey Sol,
No, a custom K20 board acting as SPI slave, while getting interrupt from a couple A/Ds.
AHH! Maybe I should try running this stuff on a Kinetis tower board to see if my hardware is having an issue.
Hi Tom,
Yes, please try using a Freescale board, and please let me know results of this test.
Regards
Sol