I'm attempting to use the SPI port on the Ti CC1110 SOC. All looks well but no serial data. I'm using USART1 alt 1 (P0_234&5), Master, MSB first. P0_2 is the /CS and is configured as a GPIO per the spec. I have a logic analyzer on /CS,MOSI,MISO,SCLK,TP(test point) and a scope on the XTAL clock. Clocks, Ports and USART regs are set.
Running the code below: debug registers show flags URX1IF & UTX1IF set and cleared as if it is working. USART TX Byte looks good also. /CS responds correctly to code, MISO is inverted from /CS. BUT SPI SCLK, Reg U1DBUF and MOSI stay 0x00,
code snippet:
Q: 1.) I am ignoring U1UCR except FLUSH since UCR appears specfic to true USART apps. Is this my mistake?
2.) Slave is a Ti AIC26 CODEC: powered up or down (i.e. Hi Z ports) makes no difference. Does SPI need a MISO return to function?
3.) All P0_x ports configured as pull ups, this applies to GPIOs. I assumed it still applies to ports configured as peripherals. Is this my mistake?
I have tried all P0_ ports set as GPIO ouputs and confirmed PWB wiring, logic analyzer test points and nothing holding the pins low. I am using the IAR IDE.
5 long days I am out of things to try, except adding pull ups, not optimistic since debug reg U1DBUF stays 0x00.
I really appreciate any help you can provide.
SFR labels used above and reg tables can be found in the CC1110 spec at http://focus.ti.com/lit/ds/symlink/cc1110f32.pdf The CC111x is SW compatable with the CC251x.
Running the code below: debug registers show flags URX1IF & UTX1IF set and cleared as if it is working. USART TX Byte looks good also. /CS responds correctly to code, MISO is inverted from /CS. BUT SPI SCLK, Reg U1DBUF and MOSI stay 0x00,
code snippet:
Rich (BB code):
char addr , value;
addr = 255;
value = 255
do {
CODEC_SS_LOW; // /CS enable PIN P0_2
URX1IF = 0; // Clear flag from first dummy byte
U1DBUF = addr; // Send address
TP_ON; // Just a Logic analyzer "marker" using P0_0
while (!UTX1IF); // Wait for TX to finish
TP_OFF; // Just a Logic analyzer "marker" using P0_0
UTX1IF = 0; // Clear TX flag
URX1IF = 0; // Clear RX flag
U1DBUF = value; // Send value
TP_ON; // Just a Logic analyzer "marker" using P0_0
while (!UTX1IF); // Wait for end of data TX
TP_OFF; // Just a LogicPort "marker" using P0_0
UTX1IF = 0; // Clear flag
CODEC_SS_HI; // /CS disable
} while (0);
2.) Slave is a Ti AIC26 CODEC: powered up or down (i.e. Hi Z ports) makes no difference. Does SPI need a MISO return to function?
3.) All P0_x ports configured as pull ups, this applies to GPIOs. I assumed it still applies to ports configured as peripherals. Is this my mistake?
I have tried all P0_ ports set as GPIO ouputs and confirmed PWB wiring, logic analyzer test points and nothing holding the pins low. I am using the IAR IDE.
5 long days I am out of things to try, except adding pull ups, not optimistic since debug reg U1DBUF stays 0x00.
I really appreciate any help you can provide.
SFR labels used above and reg tables can be found in the CC1110 spec at http://focus.ti.com/lit/ds/symlink/cc1110f32.pdf The CC111x is SW compatable with the CC251x.
Last edited by a moderator: