Access Paged Memory Code for HCS08QE128

cancel
Showing results for 
Search instead for 
Did you mean: 

Access Paged Memory Code for HCS08QE128

3,863 Views
Contributor III
Hi:

We are working with the new MC9S08QE128 part that has a paged memory bank to support 128Kb of Flash Memory. We also use CW 6.0.

Could anybody provide an C-code example to access (read and write) the paged memory banks?

Or provide a link to an application note that describe precisely how to access the memory for this particular MCU? (There are several app notes describing a serial programmer/monitor that programs the memory, but they don't cover the paged access scheme used on the QE128).

Thank you for your help,

Regards,

Alex.


Labels (1)
0 Kudos
6 Replies

107 Views
NXP Employee
NXP Employee

The LAP registers access flash only, so I don't have a banked/linear flash programming sample for you.
I've attached a sample which shows how the provided library can be used to read from the flash via the LAP registers.
Do you plan to allocate constant/data into the paged flash, or do you intend to place code there. Placing code is much simpler, just choose the banked memory model in the wizard when creating a project. The attached project shows how to access data, in that case a bunch if strings.

Daniel

 

DEMOQE128_LAP_Dictionary.zip

Message Edited by t.dowe on 2009-10-27 01:42 PM
0 Kudos

107 Views
Contributor III
Hi Daniel:

Thank you for your example. Accessing the Linear Address Register allows to read from all memory locations.

In the mean time, Freescale Support has provided the source code for complete functions to Erase, Program and Read the Flash Memory, from one of their Training Labs. That code is also working.

I will suggest them to put it either in this forum or in the QE128 web page (maybe as an App Note)

Regards,

Alex

0 Kudos

107 Views
Contributor I

Where can I get a copy of the code from the Training Labs....is it free?

0 Kudos

107 Views
Contributor III
Hi:

Thank you for your response.

We will use the banked memory for regular code.

However, it seems that there is an error with the zip file you provided (The file is invalid or corrupted).

Could you post it again? Thanks.

In the mean time,  I will try with the LAP registers.

Regards,

Alex
0 Kudos

107 Views
Senior Contributor II
Hi Alex,
 
I tried the ZIP file and it is working fine.
May be you need to do a right click, "save link as" for it to work.
 
I just clicked on it from IE6.0.
If you have further trouble, let me know and I'll email it to you from the Forum email account
(allow Forums @@@ freescale DOT com in your email client and SPAM rules).
 
Cheers,
Alban.
0 Kudos

107 Views
Contributor III
Hi Alban:

I tried using the "save link as" and it did work. Thanks,

I'll check the examples now.

Regards,

Alex R

0 Kudos