How to free the used CSAs in context managment

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Uma
Level 1
Level 1
5 questions asked 5 sign-ins First reply posted

Dear Team,

I'm trying to free the CSA which is used during initialization in TC3xx. it is going for a trap context tap.

 

Please let me know how to clear it.

 

Thanks and Regards,

uma

0 Likes
1 Solution
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

Dear Uma,

I didn't fully understand the reason why you're saving/restoring the context. It is automatically done by the processor itself. Please see below note in the document shared above under section 4.5 Context Switching for Function Call.

"The called function does not need to save and restore the caller’s context ".

In addition to that, I hope you're using the iLLD. If yes, the CSA initialization is done in the startup code which you may refer.

Regards,

Prudhvi.

View solution in original post

0 Likes
3 Replies
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

Hi Uma,

You don't need to explicitly clear the CSAs, it is done implicitly based on dynamic events like calls, ISRs etc.

You may refer to section 4 Tasks and Function in the following document for more details:
https://www.infineon.com/dgdl/Infineon-AURIX_TC3xx_Architecture_vol1-UserManual-v01_00-EN.pdf?fileId...

Regards,

Prudhvi.

0 Likes
Uma
Level 1
Level 1
5 questions asked 5 sign-ins First reply posted

Dear Prudhvi,

Thanks for the reply!!!!

Here, what i have done is

1) I reserved two CSAs for a task, Once i terminate the particular task, I'm trying to move used CSAs (reserved during initialization) in to FCX. I hope this is like restoring back to FCX , once task is done.

while performing as above mentioned, Im facing some trap.

can you please explain how to do this.

Thanks

Uma

 

0 Likes
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

Dear Uma,

I didn't fully understand the reason why you're saving/restoring the context. It is automatically done by the processor itself. Please see below note in the document shared above under section 4.5 Context Switching for Function Call.

"The called function does not need to save and restore the caller’s context ".

In addition to that, I hope you're using the iLLD. If yes, the CSA initialization is done in the startup code which you may refer.

Regards,

Prudhvi.

0 Likes