Hello!
I got a problem trying to configure the CC1101 module using the MSP430f6659. After initializing the microcontroller I run the function which writes not-default values to the configuration registers in CC1101 an checking whether the default values are correct something like below:
CC1101_WriteReg(CC1101_IOCFG0, rfConfig->iocfg0);
__delay_cycles(240);
check = CC1101_ReadReg(CC1101_IOCFG0);
if (check != rfConfig->iocfg0)
DEBUG("\r\nCONFIG_ERROR iocfg0\r\n");
The problem is that when I debug the code I get weird values from the default/not changed registers like for example rcctrl1 (should be 0x41, but is 0x51). Every debug session different set of registers got wrong values.
On the other hand when I simply run the code and printing the values, the IOCFG2 register is never set as I want (0x06), but got the default value and the default value of RCCTRL1 is wrong (comparing to datasheet).
I thought that it is a SPI problem, but the other registers are written/read properly. I've tried to put a delay between writing and reading the registers' values, but nothing really helped.
Any help would be very appreciated.



