Full duplex SPI?


#1

Hello.

I’m trying to add a microcontroller to our Q2686-based device and decided to communicate using SPI. But, to my surprise, the SPI bus is implemented incorrectly!

First, the chip-select signal should be active during the complete WRITE+READ operation, but it’s only possible to call adl_busWrite() OR adl_busRead() but not both in one go. The chip-select signal goes inactive between the calls. Even if this is incorrect, I guess it could be overcome by driving the chip-select manually… :unamused:

The second problem is a bigger one: there’s NO fullduplex mode. Using the 4-wire interface, it should be possible to write and read at the same time, but there’s no adl_busFullDuplexTransfer() function! :open_mouth: Some devices use this full-duplex mode, but it just CANNOT be implemented in Wavecom.

Does anyone know if this functionality is going to be added, and when? Or am I mistaken and it is already there?


#2

Hi,
I had use this function like you, I also found the first problem but if you use GPIO as CS signal in parameter that you subscribe, it will work.

the second problem I think you SPI bus on Wireless CPU had designed for use with spi device such as ADC, IO expander, normally it run in half duplex,

if you interface with MCU I suggest you to change to I2C hard bus instead because SPI bus not have mechanism to break data transfer in bus your external cpu may not response on time, and your data may lost.


#3

Hi,

Did you ever come up with a way to do full duplex on the SPI buss on the Q24? Funny how with so many documents, stuff is missing!

I see a driver for a M93Cx6 eeprom memory which is a full duplex part in \samples\libraries\src\drv_m93cx6.c - problem is not any hint as to how it was hooked up in hardware! Since I don’t have the source for the spibuss functions - I don’t know. Any help would be appreciated as I am trying to complete a hardware design.

Thanks,

~ Mike


#4

Hello,
You should use the Access parameter of adl_busRead and adl_busWrite and enter your first 1-4 bytes to address parameter, and also set addresssize to correct size, then wavecom will frame this transaction to a correct chipselect signal.


#5

Yes, that does appear to be the case! :unamused:

Still, apparently, not there: https://forum.sierrawireless.com/t/can-open-at-do-full-duplex-spi-yet/4516/1

Did you manage to get around this?


#6

Actually, it isn’t!

See, for example, Fig 4 (on p15) in the Datasheet: st.com/stonline/products/lit … s/4997.pdf

You can see that the SPI Master sends the address & opcode first and then the EEPROM replies with any output data - so this is not full duplex!

There was nothing to get around! :cry: