EmbeddedRelated.com
Forums

dsPic questions

Started by mmormota March 1, 2007
I have some questions about the dsPic and environment:

/*Declare constants/coefficients/calibration data to be stored in DataEEPROM 
*/
int _EEDATA(32) fooArrayInDataEE[] = 
{0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF};

It is working, but i am just curious what is that (32)? :-)  In other code 
samples it's (2), and seems that nothing happens if I put there any 2^n 
number...

-------------------

The eeprom read, write, erase routines are working fine, however using icd2 
the eeprom window is not showing the changes, and I get an error message to 
manual refresh request. It's a mistake of my system, or a "feature" of the 
icd2? (I am using the MPLAB 7.50 version, my target is a dsPic30F4013.
(I am sure the routines are perfect, as I can read back the written data 
with the routine, or read the eeprom in programmer mode.)

-------------------

I can't find in the manuals, what interrupt priority level is necessary to 
switch the cpu back to normal mode from Sleep or Idle. I found only that if 
"high enough"...  :-)
Of course I can find it with trial-error, but better to have a correct 
description to avoid problems with different chip series etc.

Regards,
 




"mmormota" <mmormota@yahoo.com> wrote in message 
news:es7uu0$lpf$1@aioe.org...
>I have some questions about the dsPic and environment: > > /*Declare constants/coefficients/calibration data to be stored in > DataEEPROM */ > int _EEDATA(32) fooArrayInDataEE[] = > {0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF}; > > It is working, but i am just curious what is that (32)? :-) In other code > samples it's (2), and seems that nothing happens if I put there any 2^n > number...
#define _EEDATA(N) __attribute__((space(eedata), aligned(N))) It is the alignment space being allocated. -- Regards, Richard. + http://www.FreeRTOS.org A free real time kernel for 8, 16 and 32bit systems. + http://www.SafeRTOS.com An IEC 61508 compliant real time kernel for safety related systems.