I have a W5500 configured as a server and the PC is the client. I am having some problems with sending data over tcp and I want to make sure that I compute the Write Pointer properly. Since the Datasheet for the W5500 isn’t so explicit, I took the W5200 Datasheet and tried to set the Write Poiner. The code is the following:
// Socket 0 is used uint32_t ptr = getSn_TX_WR(socket_number); uint32_t dst_mask = ptr & get_TxMASK(socket_number); // get_TxMASK(0) returns 0x1FFF uint32_t dst_ptr = get_TxBASE(socket_number) + dst_mask;// get_TxBASE(0) returns 0x8000
Is this the right way to compute the destination pointer(dst_ptr) or am I doing something wrong ?
Thank you !