Other Parts Discussed in Thread: CC2500
Hi!
I've got a problem with switching between state of CC2500 using strobe commands. SPI communication works well. Configuration registers are like below:
CC2500_SETTINGS cc2500_reg_val = {
0x06, // IOCFG0 GDO0Output Pin Configuration
0x47, // PKTCTRL1 Packet Automation Control
0x44, // PKTCTRL0 Packet Automation Control
0x18, // ADDR Device Address
0x58, // CHANNR Channel Number
0x12, // FSCTRL1 Frequency Synthesizer Control
0x5D, // FREQ2 Frequency Control Word, High Byte
0x93, // FREQ1 Frequency Control Word, Middle Byte
0xB1, // FREQ0 Frequency Control Word, Low Byte
0x2D, // MDMCFG4 Modem Configuration
0x3B, // MDMCFG3 Modem Configuration
0xF1, // MDMCFG2 Modem Configuration
0x82, // MDMCFG1 Modem Configuration
0x00, // DEVIATN Modem Deviation Setting
0x18, // MCSM0 Main Radio Control State Machine Configuration
0x1D, // FOCCFG Frequency Offset Compensation Configuration
0x1C, // BSCFG Bit Synchronization Configuration
0xC7, // AGCCTRL2 AGC Control
0x00, // AGCCTRL1 AGC Control
0xB0, // AGCCTRL0 AGC Control
0xB6, // FREND1 Front End RX Configuration
0xEA, // FSCAL3 Frequency Synthesizer Calibration
0x00, // FSCAL1 Frequency Synthesizer Calibration
0x11, // FSCAL0 Frequency Synthesizer Calibration
0x04, // PKTLEN
0xFF // PATABLE
};
My program sends 4B of data (dest address, source address, and 2B of data from a sensor) in a one second time interval. The main problem is that when I fill TX_FIFO with a valid data and strobe STX command for the first time, the device remains in IDLE state (checked with the proper read register). During the second and another iterations the device enters TX state but stays in this state (but it should go to IDLE afterwards according to config). What is more the GPIO0 pin which should assert/deassert as described in the datasheet (generating an interrupt for uC) remains low all time (I can switch its state using the config register though).
Can please somebody explain to me what am I doing wrong and why my cc2500 behaves so weird? I got a plenty of this devices and I have the same problem with every of them so it must be sth wrong with the config (which I took from SmartRF Studio with a small changes suitable for my design). I would very appreciate any helpful advice.