Wiz812mj spi interface is erratic


#1



Hello,

I have added your WIZ812MJ Ethernet module to my existing PIC24HJ based design, to create a TCP Ethernet facility.

I gave encountered a problem with reading certain registers.

One example is in the attached photos.

I am writing 0xAA to address 0x0420 (IMG_0009) and when I read back from 0x0420 I get x08 (IMG_0010).

I can do a successful write/read cycle to many registers, but not all.

This is causing me a major problem e.g. I cannot read S0_TX_WR for buffer control.

Please help, I cannot see what I am doing wrong.

Best Regards Mike.


#2

Hi,
You maybe have mistaken.
Sn_TX_WR register address is 0x0424, not 0x420.

The register located at 0x0420, Sn_TX_FRS is read only register. If you read 0x08 from 0x0420, its value Sn_TX_FSR’s MSB value, maybe used in 2K TX buffer size (0x0800).

Please check the address of regsiter again.

Thanks.


#3

hey, Wiggum23.

i can know your problem.

WIZ812MJ Used WIZnet’s W5100 chip.

on the datasheet of W5100, address 0420-0421 can’t write.

the register must use reading.

you says “I can do a successful write/read cycle to many registers, but not all.”,

i think it is you can’t check W5100’s datasheet or register’s character.

i hope this reply is helpful to you.



#4

Many thanks for your replies,

I made a simple mistake.

I still couldn’t write/read to 0x0424 ( S0_TX_WR ) then I found this on another forum :-

“Looks like the Sn_TX_WR only gets updated AFTER a successful SEND! You’ll have to keep track of all the writes to the TX buffer and write the TOTAL bytes to send in the Sn_TX_WR register, perform the Send and then Sn_TX_WR can be read and will have the updated value in it.”

I am now getting good results but I think this should be added to the datasheet as soon as possible.

Best Regards Mike.


#5

Hi,

In W5100 datasheet v1.2.4, It is already mentioned.


Thanks for your advice.