Oct 10, 2018
02:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 10, 2018
02:23 AM
At this early stage of development I am getting a hard fault at the first attempt to read the FLASH0.FCON register.
In the XMC4500 reference manual I see the statement...
"FCON is a Privileged Mode protected register."
... so maybe an unlocking sequence is required. But I am unable to locate any information.
Workalot.
In the XMC4500 reference manual I see the statement...
"FCON is a Privileged Mode protected register."
... so maybe an unlocking sequence is required. But I am unable to locate any information.
Workalot.
- Tags:
- IFX
3 Replies
Oct 18, 2018
01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 18, 2018
01:58 AM
Hi,
The FLASH0->FCON, register is accessed in the SystemCoreSetup() function in system_XMC4500.c file. After reset you are in privilege mode. If you do not explicitly switch to unprivileged mode, you should be able to access the register.
Can you show your code?
Regards,
Jesus
The FLASH0->FCON, register is accessed in the SystemCoreSetup() function in system_XMC4500.c file. After reset you are in privilege mode. If you do not explicitly switch to unprivileged mode, you should be able to access the register.
Can you show your code?
Regards,
Jesus
Oct 23, 2018
12:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 23, 2018
12:00 AM
Thank you jferreira.
Yes, as you say, privileged mode is about when entering the reset handler and all registers should be accessible. So after a few days of being elsewhere minded, a return to the problem. Code that occurs before the call to SystemCoreSetup() has been selectively made inactive until the offending code was identified. Why it is doing so is for further investigation and possibly another forum thread.
Workalot
Yes, as you say, privileged mode is about when entering the reset handler and all registers should be accessible. So after a few days of being elsewhere minded, a return to the problem. Code that occurs before the call to SystemCoreSetup() has been selectively made inactive until the offending code was identified. Why it is doing so is for further investigation and possibly another forum thread.
Workalot
Oct 24, 2018
02:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 24, 2018
02:36 AM
The faulting code is a consequence of not RTM. XMC4000 lacks bit-banding.