How to trap execution of unused memory in EEPROM?

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

How to trap execution of unused memory in EEPROM?

1,116 次查看
ramakrishnaredd
Contributor I


execution of unused memory

标签 (1)
标记 (1)
0 项奖励
回复
2 回复数

1,041 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

As I mentioned before, you should share type of the MCU. The reason is that, for example in the case of S12X MCUs you can use MPU module to check accesses.

BR

Ladislav

0 项奖励
回复

1,041 次查看
lama
NXP TechSupport
NXP TechSupport

Hi,

You have not mentioned type of the MCU, however I have one idea.

You should use FILL command  in the for all unused memory in the prm file.

Example from a CodeWarrior IDE help

SEGMENTS

     RAM_1  = READ_WRITE 0x800 TO 0x8FF

              FILL 0xAA 0x55;

END

PLACEMENT

     DUMMY  INTO RAM_1

END

I suggest you to use filling value 0x3F which is code for assembler SWI instruction.

Then you should create interrupt routine to be able to service SWI.

When SWI then happens you can check stack and read from it an address from which you have jumped to SWI interrupt.

If you want to read stack you will have to use ASM instructions.

 

Best Regards, Ladislav

0 项奖励
回复