- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Team,
There is a requirement to enter into a task through interrupt
For example,
int a;
__syscallfunc(1) void OsTC39x_API_Cal(void);
void __inrerrupt(6) OsTC39x_API_Call(void)
{
__svlcx();//upper and lower context are stored automatically when interrupt occurs
__dsync();
__asm(" j task_t1 ");
}
void task_t1()
{
activatetask(task_t2);// activate task_t2
while(1)
{
a++;
}
}
void task_t2()
{
TerminateTask();
}
so in the above example, it will never go back to interrupt to clear upper and lower CSA which is stored.
I wanted to clear it explicitly. Can u give us an example for clearing the CSA's.
Thanks and Regards,
Uma
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Uma,
May we know the use case of such requirement?
To answer your question, lower context can be restored using rslcx whereas upper context is restored by RFE executed while returning from Trap/Interrupt which might not happen in your case because of infinite loop. In general, the processor takes care of restoring the contexts it saved dynamically.
If you only need that information (UCX & LCX) for debugging then you can use access the CSA stack memory and store it in Global RAM.
Regards,
Prudhvi.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please do not consider the below line
__syscallfunc(1) void OsTC39x_API_Cal(void);
Thanks and Regards,
Uma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Uma,
May we know the use case of such requirement?
To answer your question, lower context can be restored using rslcx whereas upper context is restored by RFE executed while returning from Trap/Interrupt which might not happen in your case because of infinite loop. In general, the processor takes care of restoring the contexts it saved dynamically.
If you only need that information (UCX & LCX) for debugging then you can use access the CSA stack memory and store it in Global RAM.
Regards,
Prudhvi.