Thank you for your response. You have been clear enough, but it does not answer my question. Your post will aid me in the future about recommended receive/transmit memory allocation. Maybe the following will help.
I am not writing an application. I am writing an interface library for the W5100. This library contains a class. When an object of this class is instantiated, some of the object’s data is initialized with reasonable defaults, defaults we are familiar with, such as receive and transmit memory sizes of 2KB for all 4 sockets (0x55). During this object instantiation, the W5100 is not initialized, and the W5100’s RMSR and TMSR registers are not written to. That happens later. After object instantiation, a user has the option of changing some of the object’s public data, customizing the object, tailoring it to his/her needs. Then he/she initializes the W5100 through this object (via some function).
I’m giving this user the ability to determine how to size the sockets that suits their needs. This means they are allowed to give me bad values for RMSR/TMSR, such as 0x2E or 0xFF, and it is my job to recover from this. By “recover,” I mean the object will know which sockets are usable and which are not usable, and the object will not allow a user to interact with a bad socket.
Suppose the object receives 0x10 for RMSR and 0x2E for TMSR, i.e., a user requests
1 KB of receive buffer space and 4KB of transmit buffer space for Socket 0,
1 KB of receive buffer space and 8KB of transmit buffer space for Socket 1,
2 KB of receive buffer space and 4KB of transmit buffer space for Socket 2,
1 KB of receive buffer space and 1KB of transmit buffer space for Socket 3.
Which sockets will work? Socket 0 only? Sockets 0 and 2? None of them? All of them with undefined behaviours?
I hope this is clearer.