WIZnet Developer Forum

cant write Socket Register wiz7500p

Hi.
Need to set some registers
#define W7500x_WZTOE_SOC (0x46010000)
#define Sn0_DPORT (0x0120)
#define Sn0_DIPR (0x0124)
#define Sn0_CR (0x0010)

My programm:
//========================
a32=W7500x_WZTOE_SOC+Sn0_CR;
stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, “before write addres =%#08X, data= %#08X\r\n”, a32,stt)); wait (0.1);

*(volatile uint32_t *)(a32)=4;      // socket connect

stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, " after write addres =%#08X, data= %#08X\r\n", a32,stt)); wait (0.1);  

a32=W7500x_WZTOE_SOC+Sn0_DIPR;      
stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, "before write addres =%#08X, data= %#08X\r\n", a32,stt)); wait (0.1);            
        
*(volatile uint32_t *)(a32)=0xc0a80003;  //set IP

stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, " after write addres =%#08X, data= %#08X\r\n", a32,stt)); wait (0.1);   

a32=W7500x_WZTOE_SOC+Sn0_DPORT;      
stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, "before write addres =%#08X, data= %#08X\r\n", a32,stt)); wait (0.1);       

*(volatile uint32_t *)(a32)=80;         //set port
   
stt = *(volatile uint32_t *)(a32);
printstr(sss, sprintf (sss, " after write addres =%#08X, data= %#08X\r\n", a32,stt)); wait (0.1);  

What I see:
before write addres =0X46010010, data= 00000000
after write addres =0X46010010, data= 0X000004
before write addres =0X46010124, data= 00000000
after write addres =0X46010124, data= 00000000
before write addres =0X46010120, data= 00000000
after write addres =0X46010120, data= 00000000

Only Sn_CR (Socket n Command Register) accept writing (0->4)/
Why?

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.