[W5500] Sn_CR 레지스터가 초기화 되지 않습니다
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: [W5500] Sn_CR 레지스터가 초기화 되지 않습니다
by ykcho6424 ·
추가 확인을 해 보면 Sn_CR에 0x10(SOCK_CLOSED)을 write을 하면 해당 command를 인식하여 처리한 뒤 0x00으로 설정이 되어야 하는데
그대로 0x10으로 되어있는 것을 보면 command를 인식하지 않아 처리하지 않았기 때문에 값이 clear되지 않고 0x10 그대로 있는 것 같습니다.
혹시 command를 인식하지 않는 사항은 언제 발생하는지요…
RE: [W5500] Sn_CR 레지스터가 초기화 되지 않습니다
by Eugeny ·
You would probably get more help if you write in English. Regarding your issue I would do the following: when CR is stuck in value 0x10, perform dump of all registers of all sockets to identify their state and see if there’s anything unusual. I would dump registers using generic register read command to ensure
getSn_CR(sn)operates properly and there’really 0x10 is the respective register location.RE: [W5500] Sn_CR 레지스터가 초기화 되지 않습니다
by ykcho6424 ·
Translation with google translation and sentences are not smooth.
please understand.
I added a code to the part where the problem occurred and confirmed it and registered a sentence.
[code…]
DEBUG((EFI_D_ERROR, “[YKCHO] close, 1, getSn_SR(sn) : 0x%x, getSn_CR(sn) : 0x%x\n”, getSn_SR(sn), getSn_CR(sn)));
setSn_CR(sn,Sn_CR_CLOSE);
DEBUG((EFI_D_ERROR, “[YKCHO] close, 2, getSn_SR(sn) : 0x%x, getSn_CR(sn) : 0x%x\n”, getSn_SR(sn), getSn_CR(sn)));
while( getSn_CR(sn) ){
DEBUG((EFI_D_ERROR, “[YKCHO] close, 3, getSn_SR(sn) : 0x%x, getSn_CR(sn) : 0x%x\n”, getSn_SR(sn), getSn_CR(sn)));
}
DEBUG((EFI_D_ERROR, “[YKCHO] close, 4\n”));
Even if i do [setSn_CR(sn,Sn_CR_CLOSE)] or [setSn_CR(sn,Sn_CR_OPEN)], try reading getSn_CR(sn) and the value will not cleared.
Even if i do [setSn_CR(sn,Sn_CR_CLOSE)] or [setSn_CR(sn,Sn_CR_OPEN)], if i check the getSn_SR(sn) value, it is in the SOCK_CLOSED state.
Naturally, nothing works.
I added log again.
[LOG]
[YKCHO] close, 1, getSn_SR(sn) : 0x0, getSn_CR(sn) : 0xC0
[YKCHO] WIZCHIP_WRITE, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x2C, wb : 0x10
[YKCHO] spi_transfer, write_buffer[0] : 0x0
[YKCHO] spi_transfer, write_buffer[1] : 0x1
[YKCHO] spi_transfer, write_buffer[2] : 0x5
[YKCHO] spi_transfer, write_buffer[3] : 0x10
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x03, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x0
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x10
[YKCHO] close, 2, getSn_SR(sn) : 0x0, getSn_CR(sn) : 0x10
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x10
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x03, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x0
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x10
[YKCHO] close, 3, getSn_SR(sn) : 0x0, getSn_CR(sn) : 0x10
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x10
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x03, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x0
[YKCHO] WIZCHIP_READ, spi_data[0] : 0x00, spi_data[1] : 0x01, spi_data[2] : 0x28
[YKCHO] spi_transfer, read_buffer : 0x10
…
…
Thank you.
RE: [W5500] Sn_CR 레지스터가 초기화 되지 않습니다
by ykcho6424 ·
It was my mistake.
It was socket register address calculation error.
Thank you for your help.