Not applicable
May 05, 2013
04:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 05, 2013
04:07 PM
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!
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!
3 Replies
Not applicable
May 09, 2013
08:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 09, 2013
08:29 AM
I found that my host was deselecting my slave on every byte.
This code works once I fixed the master side.
This code works once I fixed the master side.
Not applicable
May 28, 2013
11:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 28, 2013
11:30 AM
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.
Not applicable
Jun 13, 2013
02:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 13, 2013
02:34 AM
Hi danbeadle,
The edge selection is available in the register DX2CR.CM.
rgds,
Rou
The edge selection is available in the register DX2CR.CM.
rgds,
Rou