EmbeddedRelated.com
Forums

(Novice) Debugging timing-critical code

Started by Ariel Cornejo July 22, 2004
Regards...

I need to code ISO-7816-3 (contact smartcards, data-link layer) in 
some MCU but I'm still pondering my options.

I was thinking of simply using a couple of HC08's I've got handy, 
but my concern is: Will I be able to log/trace what goes on at 
9600/55000 bps? How? Right now I'm reading the section on Monitor 
ROM for the HC08, but it looks quite complicated and it is probably 
going to wreck the tight timing required.

Any thoughts/pointers? 
Maybe I should dump the HC08 for something featuring BDM?

Background: besides typical x86 low-level asm proggies, I've used 
68000s and Z80s (the original thing), asm-level too. Still, I've 
always resorted to the Leds-and-Scope approach when it comes to 
real-time response.

Thanx in advance...

Ariel Cornejo
> I was thinking of simply using a couple of HC08's I've got handy, > but my concern is: Will I be able to log/trace what goes on at > 9600/55000 bps? How? Right now I'm reading the section on Monitor
What do you need to log/trace? A serial data stream, right? Are there monitorable events you can use as good scope triggers?
> always resorted to the Leds-and-Scope approach when it comes to > real-time response.
And there are a bunch of things you can debug with that. For your application, it might be time well spent [compared to the cost of a deep logic analyzer] to build a little session logger that captures the bidirectional data flow and forwards it to a PC over serial or USB. That should be no more than a weekend project. And you can have the same micro strobe an output pin when it detects certain data flowing through.