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 support@ccsinfo.com

erase_program_memory above 0x8000 address in Pic24

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



Joined: 08 Nov 2010
Posts: 2

View user's profile Send private message

erase_program_memory above 0x8000 address in Pic24
PostPosted: Mon Nov 08, 2010 10:53 am     Reply with quote

I'm programming a PIC24FJ64GA006 with the PCD compiler 4.107.
I'm trying to erase program memory above the address 0x8000 and it's impossible.
I can write, but I can't erase.
I use the function erase_program_memory().
Should I change any register?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Nov 08, 2010 1:16 pm     Reply with quote

At least, the function has been working in previous PCD versions. I have compiled the production version of
my bootloader about one year ago with V4.098. So if the function has been broken since then, I won't get
aware of.

How did you determine that the function fails? Are you sure, that you didn't protect part of the program flash?
Otherwise, e.g. erase_program_memory(0x8000) should work.
ferrigato23



Joined: 08 Nov 2010
Posts: 2

View user's profile Send private message

PostPosted: Mon Nov 08, 2010 2:37 pm     Reply with quote

When I read after erase I had the same value before erase.
How can I protected or deprotected that part?
I have the configuration bits register 1, the bits 12 and 13 set to 1, it's that ok? somewhere else its possible to protect?
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Nov 08, 2010 4:36 pm     Reply with quote

I found, that 24FJ64GA006 has no protection for individual flash segments, so the problem can't be caused by partial protection.
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