Oct 13, 2020
04:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
04:52 AM
I am having an issue while reading ASCLIN0_CLC, not through the debugger, if I read using the debugger everything is fine, however, if I try to read the register using SW without debugger alarm is invoked, so what exactly is going on?
- Tags:
- IFX
6 Replies
Oct 13, 2020
05:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
05:09 AM
Is your code executing in User-0 mode (PSW.IO=0)? User-0 code will invoke an MPP trap or SMU alarm if it accesses the peripheral space.
If it's not that, what alarm are you getting? What's in DEADD?
If it's not that, what alarm are you getting? What's in DEADD?
Oct 13, 2020
05:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
05:17 AM
UC_wrangler wrote:
Is your code executing in User-0 mode (PSW.IO=0)? User-0 code will invoke an MPP trap or SMU alarm if it accesses the peripheral space.
If it's not that, what alarm are you getting? What's in DEADD?
the SMU alarm or MPP trap upon accessing peripheral space even on reading? because I am just trying to read the register and the read access from the user manual seems to be available in User mode.
Oct 13, 2020
05:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
05:29 AM
Loads aren't allowed in User-0 mode either:
TriCore Architecture Manual Vol 1.
MPP - Memory Protection Peripheral Access (TIN 5)
A program executing in User-0 mode attempted a load or store access to a segment is configured to be a peripheral segment.
Oct 13, 2020
05:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
05:59 AM
Each task is allocated its own mode, depending on the task’s function:
• User-0 Mode: Used for tasks that do not access peripheral devices. This mode cannot enable or disable interrupts.
• User-1 Mode: Used for tasks that access common, unprotected peripherals. Typically this would be a read or write access to serial port, a read access to timer, and most I/O status registers. Tasks in this mode may disable interrupts for a short period. (The default behaviour of this mode may be overriden by the system control register).
• Supervisor Mode: Permits read/write access to system registers and all peripheral devices. Tasks in this mode may disable interrupts.
As written, you are in User-0 mode and get therefore a trap. In User-1 mode you can access the peripherals therefore the peripherals must be readable in User mode.
• User-0 Mode: Used for tasks that do not access peripheral devices. This mode cannot enable or disable interrupts.
• User-1 Mode: Used for tasks that access common, unprotected peripherals. Typically this would be a read or write access to serial port, a read access to timer, and most I/O status registers. Tasks in this mode may disable interrupts for a short period. (The default behaviour of this mode may be overriden by the system control register).
• Supervisor Mode: Permits read/write access to system registers and all peripheral devices. Tasks in this mode may disable interrupts.
As written, you are in User-0 mode and get therefore a trap. In User-1 mode you can access the peripherals therefore the peripherals must be readable in User mode.
Oct 13, 2020
10:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
10:09 AM
MoD wrote:
Each task is allocated its own mode, depending on the task’s function:
• User-0 Mode: Used for tasks that do not access peripheral devices. This mode cannot enable or disable interrupts.
• User-1 Mode: Used for tasks that access common, unprotected peripherals. Typically this would be a read or write access to serial port, a read access to timer, and most I/O status registers. Tasks in this mode may disable interrupts for a short period. (The default behaviour of this mode may be overriden by the system control register).
• Supervisor Mode: Permits read/write access to system registers and all peripheral devices. Tasks in this mode may disable interrupts.
As written, you are in User-0 mode and get therefore a trap. In User-1 mode you can access the peripherals therefore the peripherals must be readable in User mode.
I checked the PSW.IO and the value is supervisor, but as I said the issue only takes place if I am not using the debugger, if I am using the debugger the trap is not invoked
Oct 13, 2020
12:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2020
12:18 PM
When a debugger is connected, the watchdog system is disabled by default. Could it be that that line just happens to be where the watchdog expires? Which alarm are you seeing?
This widget could not be displayed.