We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Yet more SPI woes (MRF24J40MA)



  • Hello.

    I am trying to communicate to a Zigbee antenna, model as in subject.
    Today I tried various settings with no avail; I have prepared my Omega2 BASE to get gcc tomorrow so I might try more accurate tests.

    Various threads involving SPI issues I've seen:

    For the time being, I am attempting a short read as at page 14. This seems coherent with what spi-tool ... read <--> spiTransfer would be able to do.

    I tried

    spi-tool -b 1 -d 32766 read 0x00
    

    Expected: 0x00. Got: 0x00. So far so good?
    Unfortunately, I always get only 0, for everything I read, for example:

    spi-tool -b 1 -d 32766 read 0x2C
    

    Expected: read of register 0x16 (PACON0) value at POR 00101001 = 0x29
    Get: 0x00

    I figured maybe my pins were wrong or perhaps frequency too high. So I tried

    spi-tool -b 1 -d 32766 --frequency 50000 --bpw 8 --sck 7 --mosi 8 --miso 9 --cs 6 setup
    

    Attempted other reads; this device has few non-zero fields but with no luck. I always get 0.

    I need help troubleshooting this, because I have checked the connections 42 times and I'm now out of ideas. I only have a $10 multimeter. BTW, will spi-tool or the library (they are sorta equivalent from what I see) support 12-bit values? If the command-response model has to be honored, I need 12-bit values to perform long reads on this device.



  • @Massimo-Del-Zotto Getting nothing back often means you haven't activated the chip select that is connected to the peripheral.

    A scope is really key to debugging this, or one of the cheap USB-based logic analyzers.



  • Sounds legit.
    So in the meanwhile I hooked up another RF device and re-soldered and re-checked everything again.

    Nothing seemed to work either; next week I'll hook it up at a scope at office.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.