CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem writing to dsPic program memory

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cbarberis



Joined: 01 Oct 2003
Posts: 172
Location: Punta Gorda, Florida USA

View user's profile Send private message Send e-mail

Problem writing to dsPic program memory
PostPosted: Tue Aug 03, 2010 10:01 am     Reply with quote

Help!!
For some reason I am unable to write to flash program memory and consequently read such. I am using the latest version of the PCD compiler (V4.109) and using a dsPIC33FJ12GP202. Based on the compiler manual I tried doing as shown. But it appears that I am not writing to the memory location as I always read 0xFFFF from the location that I supposedly wrote to. Also when I look at the program memory I do not see what I wrote.

I am sure that there is something very obvious that I am missing here. As usual any help is appreciated.
Code:

#define PWDELAYVAL 0x001000   // this is the memory location that I am storing to

unsigned int16 bytecount = 4;
unsigned int16 PW_delay ;

 write_program_memory(PWDELAYVAL, &PW_delay, bytecount);    // this is what I use to write

read_program_memory(PWDELAYVAL, &PW_delay, bytecount);   // and this is what I use to read it
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group