Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC

Ads

Discussion Groups

Discussion Groups | 68HC12 | Placing Data Objects in EEPROM

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Placing Data Objects in EEPROM - bernd71093 - Nov 22 11:51:00 2005

Hi experts,

I want to access data in the EEPROM space 0xC00. The target is the
S12XDP512. The compiler I use is called Cosmic v4.6.

The EEPROM space definition in the linkfile looks like:
=========================================================
+seg .eeprom -b 0xC00 -o 0x13FC00 -m 1024
var_eeprom.o //my file with the eeprom data //(-b: logic adr.; -o:
memory adr.; -m 1k size) The var_eeprom.c file:
======================
@eeprom char warm_start; // EEPROM variable definition

The main.c file:
===================
extern char warm_start;
...
main{
...
warm_start++; // doing something with the eeprom data
...
} PROBLEM:
There is no access to variable "warm_start" (no read and write is
possible. The value is always the same!?!

Thanks for your support!!

Bernd




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )


Re: Placing Data Objects in EEPROM - Doron Fael - Nov 22 12:10:00 2005

Bernd,

You need to make sure your code (or the compiler initialization) is
initializing the ECLKDIV - EEPROM Clock Divider Register to the appropriate
divide value, so the EEPROM erasing and programming algorithms work well.
The appropriate ECLKDIV register setting depends on clock frequency, so the
Compiler probably needs you to specify it explicitly.

Hope this helps,
Doron
Nohau
HC12 In-Circuit Emulators
www.nohau.com/emul12pc.html

At 15:51 22/11/2005 +0000, you wrote:
>Hi experts,
>
>I want to access data in the EEPROM space 0xC00. The target is the
>S12XDP512. The compiler I use is called Cosmic v4.6.
>
>The EEPROM space definition in the linkfile looks like:
>=========================================================
>+seg .eeprom -b 0xC00 -o 0x13FC00 -m 1024
>var_eeprom.o //my file with the eeprom data //(-b: logic adr.; -o:
>memory adr.; -m 1k size) >The var_eeprom.c file:
>======================
>@eeprom char warm_start; // EEPROM variable definition
>
>The main.c file:
>===================
>extern char warm_start;
>...
>main{
>...
>warm_start++; // doing something with the eeprom data
>...
>} >PROBLEM:
>There is no access to variable "warm_start" (no read and write is
>possible. The value is always the same!?!
>
>Thanks for your support!!
>
>Bernd [Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Placing Data Objects in EEPROM - embeeded dept - Nov 24 4:23:00 2005

Hello,

U r allocating ur EPROM space.I'd better suggest u go thru the manuals of the cosmic, and ur linker file. this is b'cos u will hav 2 see where u r placing ur uninitialised data. By dfault, it gets stored in the .bss section, ie ur RAM. so u won't be able to read the correct(desired )value of ur variable from EEPROM.

If u want to modify some variable, the variable which u r modifying shld be in RAM. U hav 2 modify ur linker file accordingly.

bernd71093 <bernd71093@bern...> wrote:
Hi experts,

I want to access data in the EEPROM space 0xC00. The target is the
S12XDP512. The compiler I use is called Cosmic v4.6.

The EEPROM space definition in the linkfile looks like:
=========================================================
+seg .eeprom -b 0xC00 -o 0x13FC00 -m 1024
var_eeprom.o //my file with the eeprom data //(-b: logic adr.; -o:
memory adr.; -m 1k size) The var_eeprom.c file:
======================
@eeprom char warm_start; // EEPROM variable definition

The main.c file:
===================
extern char warm_start;
...
main{
...
warm_start++; // doing something with the eeprom data
...
} PROBLEM:
There is no access to variable "warm_start" (no read and write is
possible. The value is always the same!?!

Thanks for your support!!

Bernd
SPONSORED LINKS
Freescale semiconductor inc Microcontrollers Pic microcontrollers 8051 microprocessor

---------------------------------
YAHOO! GROUPS LINKS ---------------------------------
---------------------------------
Yahoo! Music Unlimited - Access over 1 million songs. Try it free.

[Non-text portions of this message have been removed]




(You need to be a member of 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )