Attachments are accessible only for community members.
Not applicable
Nov 28, 2016
04:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 28, 2016
04:06 AM
Hello,
I need to store and erase parameter data via In-Application-Programming in the XC886 32kB Flash Device.
Moreover I have a lack of code memory. So I use 7kB of the Data-Flash as additional code memory.
This works fine. So the Code is executed well, independent if it is stored in the Program-Flash-Banks (0x0000…0x5FFF)
or in D-Flash-Bank 1 or in D-Flash-Bank 0.
If only D-Flash-Bank 1 is written with Code-Memory (till 0x6FFF), everything works fine. I can erase and write to the flash
without problems.
The point is: If D-Flash-Bank 0 is written with Code-Memory, the In-Application-Programing-functions don’t work anymore.
Sometimes I can’t erase the parameters (the function stays in an endless loop) and writing to the flash works.
Sometimes I can’t write to the flash and erasing works.
(Note: I am sure that the code memory is not in the sectors which I use as data and I am sure that I do not erase
or overwrite code memory)
I have attached a file with the Flash-functions I use. I relocated these functions via linker instructions to different places
in the code memory (0x7800, 0x6800, 0x5800, 0x2800, 0x2200). On some of these places the
In-Application-Programing-functions work again, but if I add or remove e.g. 100 Bytes of code, I have the same error.
Has anybody an idea?
I need to store and erase parameter data via In-Application-Programming in the XC886 32kB Flash Device.
Moreover I have a lack of code memory. So I use 7kB of the Data-Flash as additional code memory.
This works fine. So the Code is executed well, independent if it is stored in the Program-Flash-Banks (0x0000…0x5FFF)
or in D-Flash-Bank 1 or in D-Flash-Bank 0.
If only D-Flash-Bank 1 is written with Code-Memory (till 0x6FFF), everything works fine. I can erase and write to the flash
without problems.
The point is: If D-Flash-Bank 0 is written with Code-Memory, the In-Application-Programing-functions don’t work anymore.
Sometimes I can’t erase the parameters (the function stays in an endless loop) and writing to the flash works.
Sometimes I can’t write to the flash and erasing works.
(Note: I am sure that the code memory is not in the sectors which I use as data and I am sure that I do not erase
or overwrite code memory)
I have attached a file with the Flash-functions I use. I relocated these functions via linker instructions to different places
in the code memory (0x7800, 0x6800, 0x5800, 0x2800, 0x2200). On some of these places the
In-Application-Programing-functions work again, but if I add or remove e.g. 100 Bytes of code, I have the same error.
Has anybody an idea?
Labels
- Labels:
-
XC800
0 Replies