SPI questions

  1. Is it possible to read the pin status of a pin once configured to SPI?
    Example: pin 9 is Spi189 MISO if SPI is configured. In my case I would need to know when MISO goes low - that’s how CC1101 RF chip works (after enable the MISO goes low when the chip is ready). I suppose I could do it with some kind of imp.sleep but if it’s working I would use the normal way how all TI examples are doing it.

  2. Does the dummy write still necessary to read something on SPI?

  1. You can configure pin 9 to digital input, the configure it back to SPI after you determine things are ready.

  2. Yes, we’ll update the API docs when this is not necessary any more.

1a. In the next release, hardware.pin9.read() will work to obtain the pin state even while it’s still configured as SPI.

Peter

@Brown - have you seen my thread on the CC1101?

http://forums.electricimp.com/discussion/168

I never got around to testing out the actual communication. Apparently I misread that when using 915Mhz, you need a special circuit board (I dunno!). Anyway, if you happen to use any of my code, lemme know how well it works for you.

I’we seen it, TY for sharing it. It doesn’t works for me since in my solutiom I don’t have the extended pins (GDO0 etc. ) - I simply wait a bit after CS and works that way.

The communication is strange in my case too - i do receive stuff when I do not send anything ( I do trials with two CC1101) and I don’t receive when I shouldn’t. Something is fishy, I ordered now a full devkit from TI and I’ll try with those since those let me control and debug the communication.