Hi,
I am working on communication with XBee S6B module through SPI.
The problem I have is that XBee module starts transmitting reply for API command before the transmission from master is completed.
This effect is most clear during the low bit rate communication.
The XBee module sets the first bit of data on the MISO line right after the front edge of clock pulse which samples last bit of last byte of command frame from master. On the falling edge of that pulse (clock goes to idle after transmitting the last byte from master) the XBee module sets the second bit on the MISO line and as a result the very first bit of reply message could not be sampled by master. The received start delimiter value for example is 0xFC instead of expected 0x7E.
I have not heard of this issue before. In fact, I have heard that this version is very stable and Was not having any issues with its SPI port. Are you able to reproduce this with a SPI sniffer or SPI to USB device?
Is there a way to send you a snapshot of a scope screen?
I am also pretty sure you will be able to reproduce this effect by sending an API AT command request at about 1 Kbit/s.
According to what I saw, XBee module starts sending data as soon as data is ready instead of waiting for the beginning of the next byte during SPI transmission causing misalignment between transmitted and received data. For example in case with AT command the first bit of reply frame gets dropped so the received start delimiter value became 0xFC.
My concern is that there could be a chance of losing valid network packet data if it would appear on SPI bus in the middle of receiving of a byte from master.
I don’t have the ability to test this at the moment. But if you feel this is truly a bug on the module and not something in your code, I would suggest submitting a ticket with Digi support providing them with all the information needed to reproduce the issue.