Jan 20, 2020
02:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 20, 2020
02:57 AM
Hi all,
I want to assign a user level to a task (function) how do I read and write to CPU registers like the PSW.
Kind regards,
Lucas
#8042000 20422
I want to assign a user level to a task (function) how do I read and write to CPU registers like the PSW.
Kind regards,
Lucas
#8042000 20422
- Tags:
- IFX
1 Reply
Jan 20, 2020
04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 20, 2020
04:22 AM
Hi Lucas,
Core Special Function registers are read with a MFCR (Move From Core Register) instruction and written with a MTCR (Move To Core register) instruction.
Compiler support this instruction with an intrinsic function:
1. volatile int _mfcr( int _csfr );
Move contents of the addressed Core Special Function Register (CSFR) into a data register
2. volatile void _mtcr ( int _csfr, int val );
Move contents of a data register (second int) to the addressed CSFR (first int) and generate an ISYNC instruction. The ISYNC instruction ensures that the effects of the CSFR update are correctly seen by all following instructions.
Best regards,
Mr. AURIX™
Core Special Function registers are read with a MFCR (Move From Core Register) instruction and written with a MTCR (Move To Core register) instruction.
Compiler support this instruction with an intrinsic function:
1. volatile int _mfcr( int _csfr );
Move contents of the addressed Core Special Function Register (CSFR) into a data register
2. volatile void _mtcr ( int _csfr, int val );
Move contents of a data register (second int) to the addressed CSFR (first int) and generate an ISYNC instruction. The ISYNC instruction ensures that the effects of the CSFR update are correctly seen by all following instructions.
Best regards,
Mr. AURIX™