DX2ST Interupt in USIC SPI Slave Mode

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

cross mob
Not applicable
I hacked a DAVE3 app to create SPI Slave.

Basically, I set PCR = 0x8000 to allow interrupts on DX2ST. Set DX2CR to trigger on rising edge of DX2.

I am getting an interrupt on every character via the attached protocol interrupt. I want it to happen on the falling edge of the frame only.. (Frames are currently 5 bytes, so I expect the frame interrupt to happen at 1/5th the rate of the character interrupts).

This is on AB silicon, USIC0CH0.

Any suggestions. I think I have the main hookup right. If I disable DX2TIEN i get no interrupts to this service. (RX still happens). So, I don't have any other Protocol Event enabled.. It is clearly this signal causing the interrupt - just too often!
0 Likes
3 Replies
Not applicable
I found that my host was deselecting my slave on every byte.

This code works once I fixed the master side.
0 Likes
Not applicable
The documentation says that slave will interrupt on both edges of chip select in slave mode. I have found this not to be true. The interrupt happes on the selection only, not deselection. Is the documentation wrong? Or my configuration? I looked at all configuration registers and don't see any that specify rising/falling edges.
0 Likes
Not applicable
Hi danbeadle,

The edge selection is available in the register DX2CR.CM.


rgds,
Rou
0 Likes