We have recently run into a new problem. When trying to debug with Codewarrior and the BDM, the SCI port doesn't work correctly. We have tried this with two or three BDM modules, 3 or 4 different boards, and two computers.
When the code is run from the Codewarrior debugger with the BDM, the SCI port doesn't work. We have narrowed it down to enabling the receiver, SCI0CR2_RE. With this separated out to a single instruction, SCI0CR2_RE=1; the RXD pin is pulled low, actively pulled low, not just a weak pull down. Depending on the situation, this causes the RXD line to sit at 0.25 - 1V, instead of the ~3.3V it should be.
The first scenario:
We have a new C project, which works fine when run without the BDM, or when run in the emulator. When run from the debugger with the BDM, the SCI port doesn't work. This code and target board are new, but modeled after long running products.
The second scenario:
We have a large code base of existing assembly code. This code runs fine by itself, but when started from the debugger with the BDM, the SCI port shows the same behavior. I can't single step through the code, the BDM loses track when writing some of the ports, when switching the clocks, etc. This code and target board have been shipping for a number of years.
And the details:
Two different target boards
I checked the errata for both masks, and don't see anything. This only happens if the debugger is used to step through or start execution. If I power up the board, even with the BDM module attached, everything is just fine.
Has anybody seen similar issues? Any ideas?
Added p/ns to subject.