Write / Read in 2 bytes socket registers / W6100, io6Library /
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Write / Read in 2 bytes socket registers / W6100, io6Library /
by irina WIZnet ·
For example,
When S0_RX_RD0 and S0_RX_RD1 register read, it indicates 0x06 and 0x00.
Actually, the reading data of S0_RX_RD is 0x0600.
2.When measuring the data size on the network, it verifies once more for accurate data.
RE: Write / Read in 2 bytes socket registers / W6100, io6Library /
by StefiIOT ·
2 - OK
1 - That was my question. Why should we read twice one byte and not read two consecutive bytes, from address Sn_RX_RD0 . In one SPI read, with start address 0x0228, to read 2 bytes. The two bytes will be the same 0x06(first) and 0x00(second). Instead of use WIZCHIP_READ two times, to use WIZCHIP_READ_BUF (for example) with len =2 and AddrSel =0x0228(figuratively speaking, start address.)
RE: RE: Write / Read in 2 bytes socket registers / W6100, io6Library /
by irina WIZnet ·
You are right and It works if you run it as you say.
You can use the WIZCHIP_READ_BUF function with len = 2.
RE: Write / Read in 2 bytes socket registers / W6100, io6Library /
by StefiIOT ·
That is all. Thanks. You may consider this topic complete and close it.
===
I need to convert the library to work with pic32mz. Probably about 80% will have to change. I’m not an ARM specialist, but it did strike me as a weird realization, at least for me.
Another thing that impressed me is that if the speed of the SPI is reduced, the transfer stops working. I don’t know if there is a bug in the processor or a logical error in the code. So at least it’s on the W6100-EVB. Base frequency of SPI is 18MHz (SPI_BaudRatePrescaler_2).
If in spiInitailize () change
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
to
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_16 ;
or more, W6100-EVB stop working.
It turns out that the CS pin rises before sending is complete and the last bytes are actually destroyed. As speed is slower, the signal CS rises earlier to incomplete data transmission.
Maybe someone will find it useful while exploring the software and trying to connect logic analyzer.