• AVR Freaks

Hot!Preserve EEPROM dsPIC30F6013A

Author
ShaunSquatch
New Member
  • Total Posts : 20
  • Reward points : 0
  • Joined: 2016/12/06 09:41:12
  • Location: 0
  • Status: offline
2020/05/01 05:50:39 (permalink)
0

Preserve EEPROM dsPIC30F6013A

When I go in to memory settings in IPE 5.35 (Windows) and tick the Preserve EEPROM box, I constantly get an error related to the range (I get the same error for multiple tools, PicKit 4, ICD4, SNAP, PM3)
It defaults to 7ff800-7fffff, which is the range I want, but it throws a:
 
"Validation Error
/ by zero
The range(s) of EEPROM memory to be preserved.... etc."
 
I have tried multiple ranges and searched for an answer on what it is I am doing wrong without luck.
 
Any insight anyone has would be appreciated.
 
Thank you.
 
 
#1

7 Replies Related Threads

    ric
    Super Member
    • Total Posts : 28009
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/01 16:18:00 (permalink)
    0
    You're probably looking at how it works backwards.
    "Preserve" actually means it reads that range out of the chip, wipes the chip, then puts that range back in.
    Most people initially guess it means "erase everything but this region", which it cannot do.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    ShaunSquatch
    New Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2016/12/06 09:41:12
    • Location: 0
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/01 18:46:20 (permalink)
    0
    I appreciate the reply, but I understand what it is supposed to do.  I want it to pull it out, replace it in the hex file, and shove it back.  Its in an older board with older code and we are updating the working firmware but want to save the EEPROM data on board for various reasons.
     
    The range is correct and it doesn't accept it, unless I misunderstand what goes in to the window.  That is my issue not what this function is or isn't supposed to be.  Hopefully that clears up the question.
     
     
    #3
    NorthGuy
    Super Member
    • Total Posts : 6228
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/01 19:51:44 (permalink)
    4 (1)
    ric
    You're probably looking at how it works backwards.
    "Preserve" actually means it reads that range out of the chip, wipes the chip, then puts that range back in.
    Most people initially guess it means "erase everything but this region", which it cannot do.



    Technically, most (probably all) PICs provide a mechanism to preserve EEPROM by not erasing it while doing the bulk erase. Of course this must be the entire EEPROM, and it won't work if the code is protected. However, I don't think the Microchip tools utilize this feature and preserve by reading+merging.
     
    @OP: is your PIC code protected? If it is, EEPROM may not be readable, in which case there's no way to preserve it.
    #4
    ShaunSquatch
    New Member
    • Total Posts : 20
    • Reward points : 0
    • Joined: 2016/12/06 09:41:12
    • Location: 0
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/02 08:35:56 (permalink)
    0
    I am not getting that far, but the PIC is not code protected.
    Here is a screen shot with the default settings.
     
    https://www.dropbox.com/s...y09qjg/Screen.JPG?dl=0
    #5
    NorthGuy
    Super Member
    • Total Posts : 6228
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/03 06:53:32 (permalink)
    0
    ShaunSquatch
    Here is a screen shot with the default settings.

     
    Looks like a bug to me. I would file a support ticket with Microchip.
     
    #6
    tech24x7
    Junior Member
    • Total Posts : 97
    • Reward points : 0
    • Joined: 2013/10/14 21:38:52
    • Location: 0
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/05/04 01:02:25 (permalink)
    0
    It shows correct address however it seems like an issue with that family.  You can raise support ticket.
     

    Attached Image(s)

    #7
    ville00
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2011/05/22 21:24:31
    • Location: 0
    • Status: offline
    Re: Preserve EEPROM dsPIC30F6013A 2020/07/08 23:04:47 (permalink)
    0
    higrin: grin:
    There are also such doubts for me, use the chip dspic30f2010/3010,if PIC code protected bit is set when programming  ,then we can not preserve the eeprom data ,is there any way we can just update the code and presevre the eeprom , because the data in the eeprom are hard the adjust.
    even i changed the code ,set the code protectd bit off, we can not  presevre the data in the eeprom.
    unless the chip is new(never be programed before)
     
     
    #8
    Jump to:
    © 2020 APG vNext Commercial Version 4.5