Starcore SC3850 Intrinsics - how do I use bmtstc() to test the SR / EMR / IDCR registers?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Starcore SC3850 Intrinsics - how do I use bmtstc() to test the SR / EMR / IDCR registers?

Jump to solution
886 Views
paulcrone
Contributor I

how do I use bmtstc() to test the SR / EMR / IDCR registers?

0 Kudos
1 Solution
602 Views
lunminliang
NXP Employee
NXP Employee

For the instrinsic usage in C code, see below from my colleague:

SR.L is not recognized in C code, so you cannot use ‘SR.L’ as a parameter.

Instead, the following sequence can be used:

unsigned int sr_l = readSR()&0xFFFF;

return bmtstc(sr_l, 7);


It should work.

View solution in original post

0 Kudos
3 Replies
603 Views
lunminliang
NXP Employee
NXP Employee

For the instrinsic usage in C code, see below from my colleague:

SR.L is not recognized in C code, so you cannot use ‘SR.L’ as a parameter.

Instead, the following sequence can be used:

unsigned int sr_l = readSR()&0xFFFF;

return bmtstc(sr_l, 7);


It should work.

0 Kudos
602 Views
paulcrone
Contributor I

Thanks

0 Kudos
602 Views
lunminliang
NXP Employee
NXP Employee

You may use somthing like asm(" bmtstc #$7, SR.L") in C code as workaround.

0 Kudos