I wrote the driver for cc2520...And i am interfacing it to the Beaglebone.
cc2520 initialisation is fine means if i send the SNOP strobe over the spi
the reply is 0x80.. I am able to see the data on MISO in oscilloscope but
in my driver code i am not able get the data which is there on MISO pin..
I am displaying the code below..
cc2520_get_status(struct cc2520_private *priv, u8 *status)
{
struct spi_message msg;
struct spi_transfer xfer = {
.len = 1,
.tx_buf = buf,
.rx-buf = buf,
};
spi_message_init(msg);
spi_message_add_tail(&xfer, &msg);
buf[0] = CC2520_CMD_SNOP;
ret = spi_sync(spi , &msg);
if(!ret)
*status = buf[0];
}
I am always getting the status as zero but in CRO it is showing as
0x80.
Is the spi_sync() API is correct or which is better .. where might be the
problem..?
Thanks in advance..
Regards,
Bhadram

