Hello,
I am working with a DEMOAC board with the 51AC256 MCU. Codewarrior 6.2 with patch 6.2.2.
I've been trying all day to get some serial communication between two MCUs (both AC256) to work, until i FINALLY found, that the UARTs simply doent work correctly when the programm in the MCU is started from within the debugger.
When I simply close the debugger window and hit the reset button on the demo board (yeah, the real hardware reset button), then everything works just fine and reliably well.
Is there any reason for this (it seems the timing gets screwed up which is probably due to the BDM comms) and, more important, is there any way around this, since it makes using the debugger on UART applications pretty, uhm, pointless?
Regards,
Sven
Thank you very much for these insights. Well, I didnt have any watches or anything else setup, not even breakpoints (in other words, nothing on the screen got updated while the program was running), so I am not sure what the debugger would try to read from the MCU, but it's good to know where these problems may arise for future use.
Out of curiosity I just checked and tried to limit the memory area that is displayed by the debugger. I could not find any option to do that though, however I wonder if the read area aint already limited to the few bytes that are actually visible on screen?
More interesting though, I noticed that when I launch the program (hit F5 in the debugger), nothing works (as was the original problem). Then just pressing the reset button on the demo board makes the serial comms work again WITHOUT closing the debugger window first. Not sure if I tried this before. What's more, the debugger even notices that I did a reset, it does NOT lose connection and I can halt and step through the program, this time with working SCI.
I dont know if stepping through the SCI code would work as well, but since I debugged this project already (with the help of an LCD instead of the debugger ) I lack the time to investigate any further.
I'll just try to keep in mind to do the reset trick next time I encounter this problem.
Regards,
Sven