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.

TM4C and RF430CL330H

Other Parts Discussed in Thread: DLP-RF430BP, RF430CL330H, EK-TM4C1294XL

Hello there!

I'm trying to work with RF430CL330H (from DLP-RF430BP v1.1) and my launchpad (EK-TM4C1294XL), but until now I've got no sucess... I'm using I2C communication and Tivaware (ROM functions). In fact, even with RF430 datasheet, I'm not sure if my I2C routine is correct... well, let me explain what I did:

- I2C7 is in use (Boosterpack 2), in polling mode;

- Tiva's clock = 120 MHz and I2C's data rate = 100 kbps;

- After I2C configuration, there's a pulse in nRST (L-H);

- Delay (25 ms);

- Read STATUS_REG, for READY bit (while).

This is my I2C's reading routine, where NFC_SLAVE_ADDR is equal to 0x14 (right shiffed 0x28):

uint32_t Read_Register(uint32_t reg_addr)
{
uint8_t TxAddr[2];
uint8_t RxData[2] = {0,0};

    TxAddr[0] = reg_addr >> 8;      // MSB of address
    TxAddr[1] = reg_addr & 0xFF;    // LSB of address

    delayUs(5);

    //++ I2C Master is initiating a writes to the slave ++
    ROM_I2CMasterSlaveAddrSet(I2C7_BASE, NFC_SLAVE_ADDR, false);

    // Place the first byte to be sent in the data register
    ROM_I2CMasterDataPut(I2C7_BASE, TxAddr[0]);
    ROM_I2CMasterControl(I2C7_BASE, I2C_MASTER_CMD_BURST_SEND_START);
    // Delay until transmission completes
    while( ROM_I2CMasterBusy(I2C7_BASE) ){}

    // Place the second (last) byte to be sent in the data register
    ROM_I2CMasterDataPut(I2C7_BASE, TxAddr[1]);
    ROM_I2CMasterControl(I2C7_BASE, I2C_MASTER_CMD_BURST_SEND_CONT);
    // Delay until transmission completes
    while( ROM_I2CMasterBusy(I2C7_BASE) ){}

    delayUs(5);

    //++ I2C Master is initiating reads from the slave ++
    ROM_I2CMasterSlaveAddrSet(I2C7_BASE, NFC_SLAVE_ADDR, true);

    // Read first byte from the master
    ROM_I2CMasterControl(I2C7_BASE, I2C_MASTER_CMD_BURST_RECEIVE_START);
    // Delay until reception completes
    while( ROM_I2CMasterBusy(I2C7_BASE) ){}
    RxData[0] = (uint8_t)ROM_I2CMasterDataGet(I2C7_BASE);

    // Read second (last) byte from the master
    ROM_I2CMasterControl(I2C7_BASE, I2C_MASTER_CMD_BURST_RECEIVE_FINISH);
    // Delay until reception completes
    while( ROM_I2CMasterBusy(I2C7_BASE) ){}
    RxData[1] = (uint8_t)ROM_I2CMasterDataGet(I2C7_BASE);

    delayUs(5);

    return( (RxData[1] << 8) | RxData[0] );
}

The problem is that "RxData" is always returning 0x0000, even with others registers, like VERSION_REG.

Does anyone know what is happening?

Thanks a lot!