Why does W6100 returns 1 2 3 as first three bytes during every read?

I am using io6Library to communicate with w6100 and when I do getSHAR(), etc. I always get 1 2 3 as first 3 bytes in the response. So the actual length of received data will be 3 + 6 in case of SHAR but io6Library only considers read len to be 6. what is this 1, 2, 3?

When I checked the sample codes, it doesn’t seem like other 1st 3 bytes (1,2,3) are handled in io6Library?

Update: I found that the timing diagram also shows 1, 2, 3 in the in response. However, no further info is provided about what those bytes mean.

This is a value to check if SPI Read is working properly.
As the value set by WIZnet, dummy data is generally entered, but it is fixed as 123.

Then how do EVB test codes using io6Library work when these 1st 3 bytes are not handled by the library. I also didn’t see handling of 1st 3 bytes in SPI read/write methods of codes given by WIZnet. I referred to w6100-evb-gcc-eclipse and W6100EVB_CUBEIDE.

For my host controller, I have modified my SPI read/write methods to ignore these bytes. Am I missing anything? Is there a way to stop WIZnet from sending host controller 123?

Thanks!

Then how do EVB test codes using io6Library work when these 1st 3 bytes are not handled by the library. I also didn’t see handling of 1st 3 bytes in SPI read/write methods of codes given by WIZnet. I referred to w6100-evb-gcc-eclipse and W6100EVB_CUBEIDE.

For my host controller, I have modified my SPI read/write methods to ignore these bytes. Am I missing anything? Is there a way to stop WIZnet from sending host controller 123?

Thanks!

Hi,

as SPI uses a shift register and as this register is connected on one side to MOSI and on the other side to MISO, there is no way NOT to read any bits, while also writing. So i doesn’t matter, what the W6100 is sending there. There are some chips, which configure the MISO-pin to HIGH-Z until they really want to send data. What you do then? You just would get random bytes read, while writing.
There is no point of stopping the chip doing that, because at this point the W6100 never would know what data to send, until you finished telling him what to do - thats a common/standard SPI thing.

Regards