This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC110L AIR Module SSI

Other Parts Discussed in Thread: CC110L

I've been given a number of CC110L AIR Modules to be used with the Tiva C series devices. I'm starting with the TM4C123G. Unfortunately TI development for this boosterpack seems to have stopped at the MSP430 and all the documentation that came with the CC110L just keeps telling me to use the windows executable programs and the pre-programed MSP430. There are many reasons why that won't work so I'm just trying to set it up as a normal SSI device. 

I have wired it as follows

TM4C123G CC110L Function
+3.3V J1-1
GND J2-1
PB4 J1-4 SCLK
PB5 J2-8 CSN
PB6 J2-4 Rx/MISO
PB7 J2-5 Tx/MOSI

with SSI configured as

#define RADIO_SSI_PORT_BASE GPIO_PORTB_BASE

void radioConfigure(void) {
    consoleVPrint(VERBOSITY_FUNCTION, STRING_FUNC());

    MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB);

    MAP_GPIOPinConfigure(GPIO_PB4_SSI2CLK);
    MAP_GPIOPinConfigure(GPIO_PB6_SSI2RX);
    MAP_GPIOPinConfigure(GPIO_PB7_SSI2TX);

    MAP_GPIOPinTypeSSI(RADIO_SSI_PORT_BASE, GPIO_PIN_4
                                            | GPIO_PIN_6
                                            | GPIO_PIN_7);

    // chip select
    MAP_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_5);
    MAP_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_5);

    MAP_SSIConfigSetExpClk(RADIO_SSI_PORT_BASE, // ssi module base address
                           g_ui32SysClock,      // clock rate to the ssi module
                           SSI_FRF_MOTO_MODE_0, // data transfer protocol
                           SSI_MODE_MASTER,     // mode of operation
                           5000000,             // clock rate
                           16);                 // bits per frame
     MAP_SSIEnable(RADIO_SSI_PORT_BASE);

    radioEnable(true);
}

The configuration may or may not work.

The problem I'm having is that I have not been able to determine what I can actually SSIDataPut() or SSIDataGet() to/from the device to determine whether or not I can talk to it. Just looking for a ping-like command.

I found tables 5-20 and 5-21 in the CC110L datasheet which gives a list of registers.

For example there is a register for PARTNUM

Address Register Description
0x30 (0xF0) PARTNUM Part number for CC110L

How would I go about reading this register?

I'm assuming I'll have to do an SSIDataPut() to tell the CC110L what data I want and then get it. Something like:

// send the PARTNUM command (0x30 or 0xF0?)
SSIDataPut(GPIO_PORTB_BASE, 0x30);

// delay/wait for interrupt?

// read the ssi rx buffer
SSIDataGet(GPIO_PORTB_BASE, &uint32Data);


EDIT: Updated TM4C123G-CC110L AIR Module connection

TM4C123G CC110L Function
+3.3V J1-1
GND J2-1
PB4 J1-7 SCLK
PB5 J2-8 CSN
PB6 J2-4 Rx/MISO
PB7 J2-5 Tx/MOSI
  • Hello Jamie,

    Thanks... You follow the right approach to the issue by clearly stating intent, setup and code. Something that I would have spent 2 posts figuring out.

    First of all the GPIOPinWrite requires 3 arguments, the Base Address of the GPIO Module, Pin to be writtent and the value for the pin. The 3rd argument is missing and so the CS may be 0. You have to write it as

    ROM_GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_5, GPIO_PIN_5);

    Since the access is 16-bit the SSIDataPut will have the header in the upper 8 bits and then 0 in the lower 8-bit. Also the base address will be that of the SSI Module and not GPIO Module

    This would be something like (0xF000 because the format for read is 0x80 | 0x40 | 0x30, where 0x80 is for read, 0x40 is for burst mode and 0x30 is the address of the register).

    SSIDataPut(RADIO_SSI_PORT_BASE,0xF000);

    and then SSIDataGet with the SSI Module base address as well.

    Please note that before the SSIDataPut you would need to Make the CSn low and after SSIDataGet it has to be made high again.

    Regards

    Amit

  • Just found section 5.5 of the CC110L datasheet which suggests serial communication begins with a header byte starting with a read/write bit, a burst access bit and a 6-bit address. I'm not certain if the 6-bit address refers to the register address.


    CC110L is configured through a simple 4-wire SPI-compatible interface (SI, SO, SCLK and CSn) where
    CC110L is the slave. This interface is also used to read and write buffered data. All transfers on the SPI
    interface are done most significant bit first.


    All transactions on the SPI interface start with a header byte containing a R/W bit, a burst access bit (B),
    and a 6-bit address (A5–A0).

    The CSn pin must be kept low during transfers on the SPI bus. If CSn goes high during the transfer of a
    header byte or during read/write from/to a register, the transfer will be cancelled. The timing for the
    address and data transfer on the SPI interface is shown in Figure 5-3 with reference to Table 5-1.

    When CSn is pulled low, the MCU must wait until CC110L SO pin goes low before starting to transfer the
    header byte. This indicates that the crystal is running. Unless the chip was in the SLEEP or XOFF states,
    the SO pin will always go low immediately after taking CSn low.

  • Thank you Amit.

    I think I have enough to do some testing now. I'll let you know how it goes.

  • Seems to be working now. For some reason I had the SCLK line on J1-4 and it should have been J1-7 which caused some trouble. I've corrected the pin configuration in my original post.

  • Hello Jamie,

    Might I suggest re-updating it to show what it was before and what you changed it with in the original post with the comment saying that was the issue

    Regards

    Amit