AnsweredAssumed Answered

Code locks, crashes, works, locks, crashes, works...

Question asked by FridgeFreezer on May 7, 2010
Latest reply on May 18, 2010 by FridgeFreezer

Seems at least once a week I'm on here trying to understand something CW is doing...


Using CodeWarrior for Coldfire v7.2, MCF52259CAG LQFP144 micro, P&E USB Multilink.


I have a project which initialises our hardware and sets a few IRQ's up - UART, DTIM, RTC, and PIT.


Main() just toggles an LED, nothing else. The other IRQ's are doing very little other than acknowledging the interrupt. The RTC toggles an LED on a 1sec timer.


If I hit F5 to run/debug the code, first time the code just locks in an ASM section and nothing happens, if you step through it eventually drops into main() and does nothing (no IRQ's fire, no LED's toggle). Second time the code will run through the asm_startmeup / board init, enable interrupts, then crash out to address 0x0F0F0F0E (or 0xFFFFFFFE sometimes). The third time I hit F5, it downloads and runs perfectly.


I am not changing anything between builds, literally just hitting "F5", "Kill", "F5", "Kill","F5", "Kill" with the same results every time round the loop.


I don't have time to post a lot more detail right now (it's POETS day after all!) but any ideas gratefully appreciated.