Other Parts Discussed in Thread: CC1120
Hi, I am new to using this Transceiver, and I am faced with a problem.
I have paired this transceiver device with an STM32L476RG micro controller, and I am trying to achieve SPI communication between the two, with the MCU being the master.
I am trying a sequence where I write to a register and then read it. But it seems that on the SO line, all I am getting is just the status byte, and not the data byte. I should mention that I grouped my data size in 8 bits, and somehow the CSn byte goes high in between the 8 bits. (Is this expected?)
THe following is the sequence I am using:
a = 0x3636; //0x36 = SIDLE(Command Strobe)
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
HAL_Delay(1);
a = 0x002F; //Write
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
a = 0x0CAB; //Write (Writing AB to address 0C)
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
HAL_Delay(1);
a = 0x00AF; //Read( THe last 8 bits show the extended register space command)
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
a = 0x0C00; //Read
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
a = 0x3D3D;//SNOP
HAL_SPI_Transmit(&hspi2, &a , 1, HAL_MAX_DELAY);
Could anyone suggest what is going wrong here? And could someone else provide some instuctions as to how to fill in the TX FIFO and then send the data?
Thanks in advance.