Hi:
I´m working with MC9S08SE8 and I find some problems programming it at first time. When I try to program at first time I get the next message in a dialog box:
"The target MCU is not responding. Please turn MCU power off (Under 0.1v), turn MCU power on, and then click OK. This will attemp to enter debug mode through a power on reset sequence (BKGD currently is driven low."
I do that and I can program the uC. After the first programming I find no problems.
I tried as well program with "progHCS08sz" and I get the same error, but I can´t make a power on reset.
Why I can´t programing at fisrt time?
Thanks
Best regards
Dear FF,
To program a HCS08 device it is necessary to force it into Background Debug Mode (BDM). This allows the debugger full control over the HCS08 through the 2-wire BDM interface.
There are two (common) ways of forcing a chip into BKGD mode:
1. Hold the BGKD/MS pin low while powering up the chip - a power on reset sequence.
2. The HCS08 chip may be 'forced' to do a reset through the BDM interface. The BKGD/MS pin may then be held low while this occurs to gain 'full' control of the chip through the BDM interface.
The first method is 100% reliable but, as you discovered, it usually requires the user to manually cycle the power to the chip. The debugger (BDM interface) will be holding the BKGD/MS pin low so that this results in a reset to Background debug mode. Some BDM interfaces can supply power to the target and so can do this without needing human intervention! This is good for unsupervised programming.
The second method should also be reliable. Unfortunately this is not the case for _some_ chips in some cases. It is possible for the chip to get into a situation where a illegal instruction reset, illegal address reset or COP timeout reset occurs before the BDM interface can trigger the _desired_ reset sequence. This is a viscious circle since the chip will reset over & over again. It is also possible to programatically disable the BKGD/MS pin function which disables the BDM interface. The only solution in these cases is to then use method 1.
The situation described above will, with a few exceptions, only occur if the chip is executing illegal or poorly written code. A common situation for this is when the chip is blank! So - a blank chip may be difficult to reset as you have seen. After the chip has been programmed once it will usually not be a problem and the second method can be used by the debugger to reliably gain control of the chip.
I hope the above helps.
Refer the Debugging section of MC9S08SE8 manual for more information.
bye
Hello,
The issue that you are observing happens with blank devices that do not have a dedicated RESET pin.
Since the 9S08SE8 device does not have a dedicated RESET pin, the only way to force a blank device into a Background Debug Mode is through a power on reset. Otherwise, the device will simply sit in some infinite loop and keep on RESETing.
During development, you can manually RESET the blank chip by switching off and on its power. However, during a production programming, you can easily avoid manual RESET by using a Cyclone Pro device by P&E: http://www.pemicro.com/products/product_viewDetails.cfm?product_id=1
Cyclone Pro is a rugged production programming interface which has ability to provide power to your target via pin 6 of its BDM header. It will also automatically handle power cycling for you, thus making any manual input un-necessary.
Best Regards,
Zahar
P&E