CW pro v4.6, HCS12DG256, 25Mhz Bus
I am using the assembly source from AN2153, slightly modified as a bootloader that will reside in the last 4k of Flash ($F000-$FFFF). I have an external network device (an XPort, by Lantronix) on SCI0.
I intend to be able to upgrade the firmware on any of my devices over the LAN. The Xon Xoff software flow used in AN2153 could become an issue due to how the XPort determines what data is included in a packet. It simply uses time ( >12mS between bytes = done, go ahead and send ) between incoming bytes from SCI0. There is an option to use "special" character sequences to indicate the end of a packet. I don't want to use this because the technique seems fundamentally flawed since I don't know what data might be sent and could inadvertently segment data.
To get to the question,
How do I calculate the time it takes to program a byte to Flash so that I can determine whether a particular data rate will require flow control. I'm thinking if I can program faster than I can recieve, I no longer need flow control, just the acknowledge at the end of an SRecord which means everything is good and proceed to send the next record.
I could put a scope on my board and toggle a bit to actually measure this, but I think it would be good to know how much time is attributed to the program cycle based on the clocks.