- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The XMC library USIC intialization functions (e.g XMC_I2C_CH_Init()) get the periphery out of reset by using registers in the SCU. These registers can only be accessed when in privileged mode.
If Keil RTX is used in unpriviliged mode, it is not possible to intialize the periphery from within a task. This makes the whole startup of the application very difficult especially when using C++.
Is there anyway to start the tasks in priviliged mode and then changed to unpriviliged at the end of the intialization? What cammand are needed to change modes?
Solved! Go to Solution.
- Labels:
-
XMC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is an OS topic, so it may be better to get an official answer from Keil. But my initial thought would be that if you can't initialize the USIC before OS initialization, a HW interrupt should temporarily force the priviliged mode. That may be a workaround. Generally this is how the OS itself would return to a priviliged mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using the XMC4500 at the moment, but the problem is the same with the whole family.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is an OS topic, so it may be better to get an official answer from Keil. But my initial thought would be that if you can't initialize the USIC before OS initialization, a HW interrupt should temporarily force the priviliged mode. That may be a workaround. Generally this is how the OS itself would return to a priviliged mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In a complex application, using device driver libraries and hardware abstraction layers it is not easy to implement either of your suggestions. It is not easy for a user of the XMC library to know which functions require priviliged mode, maybe this information should be added.