View previous topic :: View next topic |
Author |
Message |
ferrigato23
Joined: 08 Nov 2010 Posts: 2
|
erase_program_memory above 0x8000 address in Pic24 |
Posted: Mon Nov 08, 2010 10:53 am |
|
|
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
|
|
Posted: Mon Nov 08, 2010 1:16 pm |
|
|
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
|
|
Posted: Mon Nov 08, 2010 2:37 pm |
|
|
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
|
|
Posted: Mon Nov 08, 2010 4:36 pm |
|
|
I found, that 24FJ64GA006 has no protection for individual flash segments, so the problem can't be caused by partial protection. |
|
|
|