View previous topic :: View next topic |
Author |
Message |
JBM
Joined: 12 May 2004 Posts: 54 Location: edinburgh, Scotland
|
SPI woes with CYWUSB6935 not reading MOSI line |
Posted: Tue Feb 10, 2009 12:13 pm |
|
|
I have a project using a CYWUSB6935 and a PIC18F2525, but it seems the radio chip isn't paying attention to data being sent on the MOSI line:
All attempts to read a register return the value 0x07, which is what would be expected if I requested a read of register 0 (as its power-on default is 0x07). Trying to write to a register fails, as the radio chip interprets is as a read from register zero and so sends back 0x07. Incremental reads also return 0x07.
The only thing I can think of that would cause such a fault is if the MOSI line were always sending zeros, but my code and logic analyzer tells me the data is being sent from my microcontroller correctly. The MOSI line is connected from the serial output of my controller to the MOSI pin of the radio and is pulled low with a 100k resistor.
Has anyone else had a similar experience or any ideas why this might be the case?
If anyone is interested, I can also post my board design if it would help.
Many thanks in advance
-JBM
P.S. The xtal out pin is giving me 13MHz as expected, supply voltage is 3.3v with less than 20mV ripple, and as I said my logic analyzer tells me that data is indeed being clocked out on the MOSI pin. The data clock rate is 2MHz, although lowering it makes no difference to the results. It's always clocking out 0x07.
And yes, I know it's a long shot someone else here having used this particular chip, but it's worth a try! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
JBM
Joined: 12 May 2004 Posts: 54 Location: edinburgh, Scotland
|
|
Posted: Wed Feb 11, 2009 5:40 am |
|
|
Thanks for your post PCM programmer, but it turns out my problem was an as-yet-unidentified hardware fault in that particular board I was developing my driver code on. I happened to switch to another identical board from the batch I made up and everything started working as it should.
Once I have a working driver and project I'll commit it to the code repository to save others some time!
-JBM |
|
|
|