Bill Scheremeta

Cant use BDM in Real Time to Test Application that modifies Flash/ HCS0808QG8

Discussion created by Bill Scheremeta on Jun 22, 2006
Latest reply on Jun 30, 2006 by ROB LUND
I am developing an application for the HCS08-QG8 using CW 3.1 and the USBMultlink12 BDM pod.
 
The application uses one page of FLASH @0xE000 to store non-volatile data for calibration instead of using a separate serial eeprom.
 
Machine instructions in another page of flash erase, write, read the calibration page. This is permissible for the QG8, although other Motorola microcontrollers cannot do this.
 
I have a function to erase the calibration page of FLASH. When I single step through this function with the True Time Debugger and BDM pod, everything works as expected. But When I try to execute this function in real time using the BDM, the debugger reports a mysterious bus frequency change and the application jumps to unprogrammed locations.
 
The function disables all interrupts. The assembly code in the listing is consistent  with the requirements in the QG8 manual to erase the  page of flash 0xE000-E1FF.
 
Using the expert mode programmer in the True Time Debugger, I can alter values in this page and watch and then watch the page get erased after the erase command is launched, but only while single-stepping.
 
I have attached a disassembled C function. The assembly code is consistent with all the requirements in the QG8 manual to erase a page of flash.
 
If you have any insights, I would appreciate hearing from you. I have seen one other thread regarding this issue, but it appears that thread left this issue unresolved.
 
We had some issues like this with an 9S12 processor and a BDM, but in that case, one could not single step-- one had to execute in real time to make things work. These issues were never resolved either.

Outcomes