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.

CC1100E

Other Parts Discussed in Thread: CC1100E

我在STM32下使用SPI口读写CC1100E寄存器,单字节读取没问题,而突发连续读取就出现错误,请问这是为什么呢?

/***************************************************************************
连续写CC1100E的配置寄存器SPI方式
*输入参数 :        addr 寄存器地址;count 寄存器个数
*输出参数 :buffer 发送缓存

***************************************************************************/
void CC1100E_WriteBurstReg(uint8_t addr, uint8_t *buffer, uint8_t count)
{
 uint8_t i;
    SPI_CS_ON;
    while(SPI_MISO);        // Wait for SO pin goes low
    SPISendByte(addr | WRITE_BURST);
    for (i = 0; i < count; i++)
    {
        SPISendByte( buffer[i] );
    }
    SPI_CS_OFF;
}

/***************************************************************************
写CC1100E的配置寄存器使用SPI方式
*输入参数 :         addr 寄存器地址; alue 寄存器值
*输出参数 :无
*返回信息 :无

***************************************************************************/
void CC1100E_WriteReg(uint8_t addr, uint8_t value)
{
    SPI_CS_ON;
    while(SPI_MISO);        // Wait for SO pin goes low
    SPISendByte(addr);
    SPISendByte(value);
    SPI_CS_OFF;
}