Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).
|
Can anybody give me advise for writing a program with the P&E assembler that
produces a Mot-Hex file (S2-type) which can be used by the BDM interface and thus be written to the correct locations (Ppage 0...31) in the flash chip. A sample would be appreciated. I am trying many different things, sometimes with partial success. I am using the log2phy routine without knowing how to control it ... who wrote it? Is there doc? Gerhard |
|
|
|
Gerhard 1. Since the P&E assembler has an extended address range, you can use logical addresses even though it is an absolute assembler. You have to take care of crossing page boundaries. I usually use a macro for the call instruction which seperates the page number from the in page address as required by the instruction set. 2. Get the latest version of Log2Phy_12 from P&E's web site, it has a GUI interface and a .hlt file. Regards Dave Gerhard Maier wrote: > Can anybody give me advise for writing a program with the P&E assembler that produces > a Mot-Hex file (S2-type) which can be used by the BDM interface and thus > be written to the correct locations (Ppage 0...31) in the flash chip. A sample would be appreciated. > I am trying many different things, sometimes with partial success. I am using the > log2phy routine without knowing how to control it ... who wrote it? Is there doc? > > Gerhard > -------------------------------------------------------- > To unsubscribe from this group, send an email to: > To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu |
|
|
|
I have a program on a MC68HC912DT128A that boots into Normal Single Chip mode (BKGD=1, MODA=0, MODB=0), then changes to Normal Expanded Narrow mode (MODE=0xB0, PEAR=0x04) so that it can access some external devices. The program runs from the non-banked flash in Cxxx, and leaves registers, EEPROM, and RAM at their default locations. When I run this program using the BDM, it works great. When I boot it up without the BDM attached, the R/W line works, the Address and Data lines whack up and down, but the ECLK stubbornly refuses to work. I have read everything I can find about the ECLK, and I believe I'm doing everything correctly, but obviously something happens when the BDM is attached that does not happen without it. BTW, this same approach works flawlessly on several products using the 812A4. I'm really at a loss as to what I might be doing wrong, or missing, or what the debugger or BDM pod might be doing to make the system work. Any thoughts? Thanks, Paul |
|
|
|
Probably the problem the setting of the NECLK bit in PEAR. BDM
emulator may not be getting the word that it needs to be set on
startup. Steve At 05:10 PM 6/6/2002 -0700, Paul Johnson wrote: I have a program on a MC68HC912DT128A that boots into Normal Single Chip ************************************************************************* Steve Russell mailto:s...@nohau.com Senior Software Design Engineer http://www.nohau.com Nohau Corporation phone: (408)866-1820 51 East Campbell Avenue fax: (408)378-7869 Campbell, CA 95008 ************************************************************************* |
|
|
|
As I
indicated, I'm setting PEAR to 0x04 which sets NECLK to 0 which should enable the ECLK.
ESTR needs to be zero only in single chip mode, so that is not a factor. As far as
the "BDM emulator ... not getting the word that it needs to be set on startup" -- I am
setting PEAR and MODE explicitly in my code, so again, this should not be a factor,
especially since the BDM is not connected when the problem occurs.
If I am
misunderstanding part of your message, please explain.
Thanks,
Paul
|