EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

BDM Hardwre Command and EEPROM Read/Write

Started by shangdawei June 13, 2004
Hi, all members, I have a question :

I want to read/write EEPROM of cpu12 via BDM Hardware Command, But
how can i do ?

I think, I can use Reset & BKGD pin(MODA=MODB=0) , BKGD = 0, make
CPU12 @ Special Single Chip Mode,
So I can use READ_BD_BYTE/READ_BYTE/WRITE_BD_BYTE/WRITE_BYTE Hardware
Command direct read/write RAM. Can I read/write EEPROM directly as
same as RAM ?

Or I have to config EEPROG/EEPROT/EEMCR/EETST Register ?

Have anybody any code sample about this ?

B/R
David Shang




Hello,

> I want to read/write EEPROM of cpu12 via BDM Hardware Command, But
> how can i do ?
>
> I think, I can use Reset & BKGD pin(MODA=MODB=0) , BKGD = 0, make
> CPU12 @ Special Single Chip Mode,
> So I can use READ_BD_BYTE/READ_BYTE/WRITE_BD_BYTE/WRITE_BYTE Hardware
> Command direct read/write RAM. Can I read/write EEPROM directly as
> same as RAM ?

No.

> Or I have to config EEPROG/EEPROT/EEMCR/EETST Register ?
>
> Have anybody any code sample about this ?

Yes, you should write there through registers.
There are flowcharts and instructions in appropriate Motorola's
application notes for particular CPU. Regards, MP


READ_BD_BYTE and WRITE_BD_BYTE are for reading things in the backgrond
space. To read the normal processore resources, such as the EEPROM, you
should use READ_BYTE. You can not simple write to the EEPROM. There is a
whole procedure you must follow to do this. Look at the EEPROM section
of the Technical Summary for your particular part. Also Freescale lists
applications notes with code and flow charts for writing EEPROM.

Regards
Dave Perreault shangdawei wrote:

>Hi, all members, I have a question :
>
>I want to read/write EEPROM of cpu12 via BDM Hardware Command, But
>how can i do ?
>
>I think, I can use Reset & BKGD pin(MODA=MODB=0) , BKGD = 0, make
>CPU12 @ Special Single Chip Mode,
>So I can use READ_BD_BYTE/READ_BYTE/WRITE_BD_BYTE/WRITE_BYTE Hardware
>Command direct read/write RAM. Can I read/write EEPROM directly as
>same as RAM ?
>
>Or I have to config EEPROG/EEPROT/EEMCR/EETST Register ?
>
>Have anybody any code sample about this ?
>
>B/R
>David Shang >
>--------------------To learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu
>o learn more about Motorola Microcontrollers, please visit
>http://www.motorola.com/mcu
>
>Yahoo! Groups Links





The 2024 Embedded Online Conference