Not applicable
Feb 04, 2015
05:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 04, 2015
05:06 AM
Hi all,
I've got the following problem:
In case of power failure, I need to write a couple of variables and parameters to the internal flash. So that the application may start directly from where it left after power up.
So, basically my questions are: How can I write to flash? And how can I read from flash?
I tried a couple of things. Amongst them I tried "creating a special section". It seems that this doesn't do the trick. Or I am simply missing something.
So it would be great if anybody could give me some hints on how to read or write flash.
I am using the xe162fm (xe166 family) and tasking vx.
Thanks in advance,
Sebastian
I've got the following problem:
In case of power failure, I need to write a couple of variables and parameters to the internal flash. So that the application may start directly from where it left after power up.
So, basically my questions are: How can I write to flash? And how can I read from flash?
I tried a couple of things. Amongst them I tried "creating a special section". It seems that this doesn't do the trick. Or I am simply missing something.
So it would be great if anybody could give me some hints on how to read or write flash.
I am using the xe162fm (xe166 family) and tasking vx.
Thanks in advance,
Sebastian
- Tags:
- IFX
2 Replies
Not applicable
Feb 04, 2015
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 04, 2015
11:43 PM
Hi Sebastian,
You need to use the command sequence to write data into the flash.
More information is available in the User Manual under chapter Embedded Flash Memory.
Please mind that you can't write to the same address again without erasing it.
If you are using Keil uVision, they do provide the flash driver.
You can find it in \Keil\C166\Flash\XE16xFM - FlashDev.c
To read from Flash, you can read it directly with pointer to the address.
You need to use the command sequence to write data into the flash.
More information is available in the User Manual under chapter Embedded Flash Memory.
Please mind that you can't write to the same address again without erasing it.
If you are using Keil uVision, they do provide the flash driver.
You can find it in \Keil\C166\Flash\XE16xFM - FlashDev.c
To read from Flash, you can read it directly with pointer to the address.
Not applicable
Feb 05, 2015
12:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 05, 2015
12:52 AM
Thanks a lot.
I had a look in the Programmer's guide and the Data sheet. But I missed the user's manual 😞
Damn rookie mistakes.
I had a look in the Programmer's guide and the Data sheet. But I missed the user's manual 😞
Damn rookie mistakes.