DSPRelated.com
Forums

Flags and SPI on 21262

Started by Dirk Bruere August 4, 2008
Since I need to access more than 4 devices on SPI I would like to use spare
DAI pins as chip selects.
Of the 4 flag pins I want to use the first three as inputs for INTs from
peripherals, and the fourth as an LED driver.
Is there anything wrong with this setup? Specifically when I service an
interrupt by using SPI? I've read the manual but still not entirely clear
since a lot of emphasis is placed on using the flag pins as chip selects
with SPI.

Dirk
You can use any pin for /SSs as long as you are controlling the SPI
interface manually (not DMA). With the exception of bootloaders, we
always use the SPI in this way.

An alternative is to use a decoder such as a 74138 to expand the Flags.
If you use this method you want to make sure you reserve the 1111 state
for inactive and move from an active to inactive state so that you don't
inadvertently pass through another active state during transition.

The last method that we use regularly for large systems is to use paging
where one /SS is used to select the device and one /SS as the strobe.
Large systems tend to use the entire DAI so this method is often the
practical choice.

Al Clark
Danville Signal Processing, Inc.

Dirk Bruere wrote:
> Since I need to access more than 4 devices on SPI I would like to use
> spare DAI pins as chip selects.
> Of the 4 flag pins I want to use the first three as inputs for INTs
> from peripherals, and the fourth as an LED driver.
> Is there anything wrong with this setup? Specifically when I service
> an interrupt by using SPI? I've read the manual but still not entirely
> clear since a lot of emphasis is placed on using the flag pins as chip
> selects with SPI.
>
> Dirk
>
Another request - anyone got a C code fragment for flipping the flag pins
when SPI not being used?

Dirk

2008/8/4 Dirk Bruere

> Since I need to access more than 4 devices on SPI I would like to use spare
> DAI pins as chip selects.
> Of the 4 flag pins I want to use the first three as inputs for INTs from
> peripherals, and the fourth as an LED driver.
> Is there anything wrong with this setup? Specifically when I service an
> interrupt by using SPI? I've read the manual but still not entirely clear
> since a lot of emphasis is placed on using the flag pins as chip selects
> with SPI.
>
> Dirk
>