reading constant from paged memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

reading constant from paged memory

跳至解决方案
1,025 次查看
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.

标签 (1)
0 项奖励
1 解答
893 次查看
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 项奖励
1 回复
894 次查看
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 项奖励