reading constant from paged memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

reading constant from paged memory

Jump to solution
24,373 Views
martinlockner
Contributor III

I am using codewarrior 10.4 with a mc9s08dz128 microcontroller. I have the micro set for banked memory and have placed a constant table in paged memory (it starts at 0x58000). I used the following #pragma to locate the table in paged memory:

 

 

#pragma CONST_SEG __FAR_SEG PAGED_ROM

 

extern const byte printer_fonts [] = {

 

My problem is reading one of these constant bytes. In reading the documentation it seems like the compiler/linker will automatically handle the extra addressing needed but nothing I have tried works. If I try to read the first byte I get the value that is located at address 0x8000 which means that the page register is not being handled. Anyone run into similar problems? Thanks in advance.

Labels (1)
0 Kudos
Reply
1 Solution
24,241 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Martin,

please read attached an3730 document and demo code, which includes how to read/write HCS08 paged memory.

Hope this helps!

========================================

this answer is for you. if it helps, please click on "correct answer " button. thanks!

Best Regards,

ZhangJun

View solution in original post

0 Kudos
Reply
1 Reply
24,242 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Martin,

please read attached an3730 document and demo code, which includes how to read/write HCS08 paged memory.

Hope this helps!

========================================

this answer is for you. if it helps, please click on "correct answer " button. thanks!

Best Regards,

ZhangJun

0 Kudos
Reply