Hello,
I am trying to read a register on the CC1101 over SPI.
Unfortunately I do not seem to be getting a valid response back when I read from the part number and version number registers (0x30 and 0x31).
I have monitored the comms with a scope and the commands in and clock and CS seem correct, but I am only getting the status byte back twice.
To read I am transmitting 0xb1 then 0x00 (the 0xb1 has been reversed so I am actually writing 0x8d). I would expect 0x0f returned and then the partnumber, but I am getting 0x0f, 0x0f.
I can confirm thae the ~CS pin is held low for the entire two byte transmission time.
Any ideas?
Thank you
Matt
Hi Matt
I'm not sure I understood what you are actually transmitting, but if you want to read a status register from the CC1101 you need to set both the read and the burst bit in the header byte. If you want to read the part number register you have to transfer 0xF0 over the SPI and 0xF1 for the part version register. See attached image
Best regards
Martin
---------------------------------------------------------------------------------------------------------Please click the Verify Answer button on this post if it answers your question.---------------------------------------------------------------------------------------------------------
Thank you for your response. I didn't realise I needed to set the burst bit. I have set by transmitting 0xf1, as shown in your diagram.
Unfortunately I am still getting an incorrect response from the CC1101: -
What frequency is your SPI running on? It is a little hard to tell from your plots. Be sure to follow the timing requirements stated in Table 22 of the datasheet. Also, from what state are you trying to read the registers (IDLE, TX, RX PWD)?
Do you get the same response independent of which register you are trying to read? What about command strobes, are you able to send them and get a correct status byte in return?
Thank you for your help I have got to the bottom of the problem. I was outputting data on the wrong clock phase.
However, you did prompt me to look at my operating frequency, I was running incredibly slowly, so I've improved the CLK rate.
Hi
I have similar problem and runnig in 1MHZ what was your low freq?
Thanks,
The CC1101 will support SPI traffic at 1 MHz. As I told Matt be sure to follow the timing considerations statet in table 22 in the datasheet.
Hello Or,
Can you send a picture of your test set-up as well. In one of your previous posts you mentioned 0.5m long cable on the SPI line. Did you try with shorter connection ?
-M.
I havent tried with shorter wires thos because when testing the signals with a scope I havent saw differences in signals from the MCU and on the cc1101.
The MCU I am using is 2818.t0008_efm32_g8xx_stk_user_manual.pdf. as you can see in page 14 pd0-4 are the SPI interface.
they are conncted in the MCU first 4 pins gdo0 and 2 are the pb11 and pb13.
the 1 and 20 pis (red and black) are 3.3 V dc.
in any case I will try to shorter the wires but I do nt belive it will solve the problem, if it will I will tell you today - if you want see any other post after this it hasnt solved the problem.
Thank you very much.