AnsweredAssumed Answered

No SPI-B Chip Select Deassertion, Mode 0, Flags, DAI, on ADSP-21363

Question asked by cconrad on Aug 2, 2013
Latest reply on Aug 27, 2013 by MaheshN

My SPI-B chip select asserts fine (goes low), but will not deassert unless I write to the

FLAG register.  This seems bizarre:

 

On the ADSP-21363 SPI-B can only connect to the DAI pins.  So I do this:

 

          SRU (HIGH, PBEN12_I);

          SRU (SPIB_CLK_O, DAI_PB12_I);

          SRU (LOW, PBEN11_I);

          SRU (SPIB_MISO_O, DAI_PB11_I);

          SRU (HIGH, PBEN10_I);

          SRU (SPIB_MOSI_O, DAI_PB10_I);

          SRU (HIGH, PBEN04_I);

          SRU (SPIB_FLG0_O, DAI_PB04_I);

          SRU (HIGH, PBEN05_I);

          SRU (SPIB_FLG1_O, DAI_PB05_I);

 

I also wish to use the flag 0 pin (register and physical dedicated pin) independently

of the SPI-B, so I set them up like so:

 

  sysreg_bit_clr(sysreg_FLAGS, FLG0);

          sysreg_bit_set(sysreg_FLAGS, FLG0O);

 

I set up the SPI-B like this:

 

          *pSPICTLB   = 0;

          *pSPIFLGB   = 0;

          *pSPIDMACB  = 0;

          *pSPIBAUDB  = 0;

          *pSPISTATB  = 0xFFFF;

          *pSPIBAUDB  = 70;

          *pSPICTLB   = TIMOD1 | SENDZ | GM | WL16 | MSBF | SPIMS | SPIEN;

 

I write a word like this:

 

  *pSPIFLGB = DS0EN;

          *pTXSPIB  = Value;

          asm("nop;nop;nop;");

          while ((*pSPISTATB & SPIFE) == 0);

 

But the external pin DAI_PB04 never goes high until I do this:

 

            BIT SET FLAGS FLG0;

 

Which should be unrelated to SPI-B.  SPI-B does not connect to the physical flag pin!  So how do I control my SPI-CS 0 chip

select (which is on a DAI pin) and have independent control of the physical flag 0 pin?

 

Thanks

Outcomes