How to trap execution of unused memory in EEPROM?

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

How to trap execution of unused memory in EEPROM?

515 Views
ramakrishnaredd
Contributor I


execution of unused memory

Labels (1)
Tags (1)
0 Kudos
2 Replies

440 Views
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 Kudos

440 Views
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 Kudos