I am trying to use SPI1 and CS1 on my OMAP-L138 board but am having trouble properly configuring the chip select 1 registers (I am using CCSv5.1.0.07001). Here is my SPI config.
SPIGCR1=Master
SPIPC0 0x01010E02 Memory Mapped Register: Pin Control Register 0
_RESV_1 ******************** Reserved
SOMIFUN 0x1 - SPI SOMI function
SIMOFUN 0x1 - SPI SIMO function
CLKFUN 0x1 - SPI CLK function
ENAFUN 0x0 - GPIO ENA function
SCS0FUN7 0x0 - GPIO SCS7 function
SCS0FUN6 0x0 - GPIO SCS6 function
SCS0FUN5 0x0 - GPIO SCS5 function
SCS0FUN4 0x0 - GPIO SCS4 function
SCS0FUN3 0x0 - GPIO SCS3 function
SCS0FUN2 0x0 - GPIO SCS2 function
SCS0FUN1 0x1 - SPI SCS1 function
SCS0FUN0 0x0 - GPIO SCS0 function
Note that when step through the code and set SCS0FUN1=0x1 I can see the SPI1_SCSn_1 line toggle high, which is what I would expect. However, when I set SPIDAT1.CSNR=0, the SPI1_SCSn_1 line goes low, which I guess is OK. But when I set SPIDEF.CSDEF1=1 I do *not* see the SPI1_SCSn_1 line toggle back to a high state. The SPI1_SCSn_1 then stays low and never toggles during data transmissions.
Also, I am confused by the SPIDEF.CSDEFn register values shown in the Registers View of CCS. The only CSDEF register shown is CSDEF0. Why are the others (CSDEF1 - CSDEF7) not showing up? I cannot see the correct value that I am trying to set in CSDEF1....? As shown below, CSDEF0 is low (which is what I set it to), but where is CSDEF1 and what is its value?
SPIDEF 0x00000010 Memory Mapped Register: Default Chip select Regsiter
_RESV_1 ******************************* Reserved
CSDEF0 0x0 - LOW Chip select default pattern
Thx,
MikeH