Is it possible to make some SRAM memory regions write protected (Not Read Protect) ?
For example, I am using Atmega 328p, if my knowledge is correct it's SRAM memory starts from 0x0100 to 0x08FF. I want the arduino sketch program to use only 0x0100 to 0x08B9. Is it possible to read that unused memory locations (0x08b9-0x08FF) in arduino sketch.
Boney:
Is it possible to make some SRAM memory regions write protected (Not Read Protect)
The closest thing you can do to simulate this is to declare certain variables PROGMEM, which will place the data into flash memory, so it will be readable but not writeable during program execution. It won't really be SRAM, but will (mostly) look as if it is to your program (which is the basic idea of PROGMEM).
Thanks for your replays guys.
So it is impossible to control the SRAM memory =(. Guys could you please help me finding good resources for AVR programming. I really want to edit the arduino bootloader (Optiboot) to read initial (Power On) SRAM random values for finding any pattern they are following. I know that it is completely random but i need to know how the values depends on temperature and voltage.
Boney:
Thanks for your replays guys.
So it is impossible to control the SRAM memory =(. Guys could you please help me finding good resources for AVR programming. I really want to edit the arduino bootloader (Optiboot) to read initial (Power On) SRAM random values for finding any pattern they are following. I know that it is completely random but i need to know how the values depends on temperature and voltage.
I would suggest that the best method to achieve your goal, is not to write protect the memory (which is impossible), but rather carefully construct your code to avoid using those areas. That means that you shouldn't use any libraries until you understand how they use memory. Personally, I would skip the Arduino IDE environment for this and deal with the AVR chip yourself directly. That way you have complete control over how and what areas of memory you use. While you can do this in C/C++ you need to write this code with an understanding of the assembly language produced by your code, since that will dictate how memory is used.
That and a thorough understanding of the data sheet for the particular AVR your intending to use is all you need to accomplish your purpose.
There has also been help over at AVR freaks, now we are back again here with the same question. You're starting to sound like elico and his endless quest to find an RTOS.