Jun 25, 2015
04:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 25, 2015
04:36 PM
Hello,
In my project on xmc4400-512 device, I use some flash sectors to store data. Now, I have end up in curious situation. It is not possible to read data from some sectors. In example sector starting at address 0x0c004000. All read accesses return 0. I am sure that there is data present because Segger programs Jmem/Jflash show correctly the content. The flash is in read mode. Flash registers seem OK. What could be wrong? Could that be the sign that flash has been used a lot? Also debugger memory window shows 0.
Thank you
rum
In my project on xmc4400-512 device, I use some flash sectors to store data. Now, I have end up in curious situation. It is not possible to read data from some sectors. In example sector starting at address 0x0c004000. All read accesses return 0. I am sure that there is data present because Segger programs Jmem/Jflash show correctly the content. The flash is in read mode. Flash registers seem OK. What could be wrong? Could that be the sign that flash has been used a lot? Also debugger memory window shows 0.
Thank you
rum
- Tags:
- flash read
- IFX
4 Replies
Not applicable
Jun 26, 2015
02:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 26, 2015
02:24 AM
Hi,
If you able to read from Segger program, means the flash is able to read.
If the flash is unreadable, Segger program wont be able to read out any data too.
It could be the way you read the flash is incorrect.
Try to use pointer to the address and copy the data to a variable to see if you can read out anything.
If you able to read from Segger program, means the flash is able to read.
If the flash is unreadable, Segger program wont be able to read out any data too.
It could be the way you read the flash is incorrect.
Try to use pointer to the address and copy the data to a variable to see if you can read out anything.
Jun 29, 2015
03:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 29, 2015
03:36 PM
Hi Rou,
I already access flash by pointer (first thing in the main just for test). If the problem would be so trivial I would not ask for help on forum. This code I have been using for months to access flash and has been working fine. The problem appeared only now for both code and debugger and only for some sectors. Only segger jmem shows correct data. I never locked any sector and flash registers appear correct. I don't know segger internals but maybe it accesses flash through SWD using some different wait state configuration which allows to view memory content (this is only supposition). I am open to any other suggestions to explain this phenomena.
rum
I already access flash by pointer (first thing in the main just for test). If the problem would be so trivial I would not ask for help on forum. This code I have been using for months to access flash and has been working fine. The problem appeared only now for both code and debugger and only for some sectors. Only segger jmem shows correct data. I never locked any sector and flash registers appear correct. I don't know segger internals but maybe it accesses flash through SWD using some different wait state configuration which allows to view memory content (this is only supposition). I am open to any other suggestions to explain this phenomena.
rum
Jul 02, 2015
02:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 02, 2015
02:09 AM
I'm on the XMC4500, and the wait states are set up in system_XMC4500.c:
/* Setup the Flash Wait State */
#if PMU_FLASH
temp = FLASH0->FCON;
temp &= ~FLASH_FCON_WSPFLASH_Msk;
temp |= PMU_FLASH_WS+3;
FLASH0->FCON = temp;
#endif
You could try to read the value of FCON to check how many wait states you are running with.
If it has been marginal, a slight raise in ambient temperature could have triggered your problem?
/* Setup the Flash Wait State */
#if PMU_FLASH
temp = FLASH0->FCON;
temp &= ~FLASH_FCON_WSPFLASH_Msk;
temp |= PMU_FLASH_WS+3;
FLASH0->FCON = temp;
#endif
You could try to read the value of FCON to check how many wait states you are running with.
If it has been marginal, a slight raise in ambient temperature could have triggered your problem?
Jul 13, 2015
04:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 13, 2015
04:26 AM
I am aware of this code. In my case, internal device flash, I am running with default wait states setting which satisfies processor specifications. My question was if flash is accessed internally through SWD somehow differently because debugger is able to read memory but code no. Anyway, I have changed new processor and everything is working fine now.