Hi PE Group,
I moved this from the DSC Community to the PE Community to see if someone here my have a better idea on how to fix this PE Driver problem or work around it better.
I made a Support Request and they put in a Ticket to PE Dev Team to maybe fix it some day. Not sure how long that might take. I added the info from the support request to the end of the exchange.
I am using a 56F82746 and set up the flash driver IntFLASH from the Components Library and having problems with the required running mode.
It needs to be set for the 'Wait In RAM' mode since the device only has one Flash area.
The problem is that when it calculates the location for the Wait In RAM code it uses the pRAM word start address but then the offset is calculated as a Byte offset which puts it in the wrong location, beyond memory and processor restarts at beginning.
I can see what is happening but cannot see how it is happening or why.
Let me know if there is a setting I am missing or if this is a bug in the driver.
Here is some information and I also attached a test project that it relates to. Just Added Attachment, 9/26/2017.
Fig 1. Driver is set to Wait In RAM. Also shows simple program being run to test it.
Fig 2. Heap size is set to a small value to show problem but code still works. Stack ends at 0xF838 in pRAM.
Fig 3. Heap size is small but "Safe Routine" is beyond the Stack, 0xF8D2 vs 0xF838. Code still runs since it is in RAM yet.
Fig 4. Heap size set to a large value to show problem and code fails. Stack ends at 0xFC38 in pRAM.
Fig 5. Heap size is larger and "Safe Routine" is beyond the Memory, 0x100D2 vs 0xFFFF for end of memory vs 0xFC38 for end of stack. Code fails and restarts at beginning.
Original Attachment has been moved to: Test82746FlashSave.zip