Interrupt when SELO on SSC

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

cross mob
User8819
Level 4
Level 4
Hello,

I use USIC configured as SSC master on xmc4000. Slave select signal SELO is active low.
Is it possible to get interrupt at the end of transmission when SELO goes high? (Not when shift register empty because I have configured small delay for SELO falling and rising edge).

rum
0 Likes
3 Replies
chismo
Employee
Employee
First like received
Hello rum,

Yes, there is a MSLS (master slave select) interrupt that is triggered whenever there is a change in the SELO signal, including at the beginning of the frame transmission.
To trigger the interrupt just at the end of transmission, one way is to enable the MSLS event for interrupt generation only after the frame transmission has started. In the service routine, the event should then be disabled for interrupt generation.
Alternatively, just skip over the first interrupt entry every time.

Regards,
Min Wei
0 Likes
User8819
Level 4
Level 4
Thanks Min Wei,

I should have read documentation better! Get two interrupts at the beginning and at the end is not the best option. Usually it is also difficult to enable interrupt while transmission is in progress. But there are no other options!
I could use PSR.MSLS to know status on SELO signal.

I wonder to have one interrupt "shift register empty" which would enable "MSLS" interrupt. But could I "miss" SELO rising edge if my first interrupt will not be fast enough?

rum
0 Likes
chismo
Employee
Employee
First like received
Hello rum,

You can consider using the TBIF interrupt to enable the end-of-frame MSLS interrupt generation. TBIF indicates that the first bit of a data word has been transmitted and therefore, is the earliest interrupt that is generated during data transmission.
If you are using multiple words per frame, then TBIF has to be disabled after the first entry to avoid triggering more than one TBIF interrupt.

Regards,
Min Wei
0 Likes