You are here: Home DOCUMENTATION Debugging Tools uBug12x User Manual - Programming the Module

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

uBug12x User Manual - Programming the Module

Article Index
uBug12x User Manual
Installation
Connecting to the Module
Programming the Module
Script Command Buttons
Command Glossary
Writing Compatible Applications
Appendix
All Pages

Programming the Adapt9S12XDP Module

The most common use for uBug12x will be to program the Flash and/or EEPROM memory. This can easily be done with the FBULK, FLOAD, and ELOAD commands. FBULK will clear both Flash and EEPROM memory. FLOAD will program Flash, and ELOAD will load an S-record into EEPROM. Both FLOAD and ELOAD when run will prompt for the S-record file to load into memory.

uBug12x will take both S1 and S2 type S-record files. S2 files are assummed to be in a banked format. This means that the most significant byte of the 24 bit address in each record line is used to program the associated PAGE register on the S12X. (The S12X has multiple PAGE registers, PPAGE for Flash, and EPAGE for EEPROM for example.) The other 16 bits in the address must be in the bank area for that memory. For Flash this mean between $8000 and $BFFF. EEPROM S2 records must have the 16 bit address between $0800 and $0BFF. What this means is that to use an S2 file to program Flash starting at $4000, the S-record will have its start address as $FD8000.

WARNING: If you are planning to use the serial monitor to program and erase the EEPROM, it is recommended that you NOT write the EEPROM location at $0FFD. This will set write protection for the EEPROM, which includes location $0FFD. This means the module will prevent further erasing or programming of the specified section by the serial monitor. If this is done, the possibility exists that a value could be accidentally written into this memory location that will disable the entire EEPROM from any further writing or erasure. Should that occur, the only way to reset the EEPROM memory will be with the use of a BDM pod.

After memory is programmed, uBug12x will report how long it took to accomplish. If there is a time of zero reported, it most likely means that uBug12x found the S2 record was not formated for banked memory as expected.




Last Updated ( Saturday, 28 May 2011 08:31 )  

Add comment


Security code
Refresh