Disable socket buffer. Increase available SRAM
MCU & Boards
No replies yet. Be the first to reply.
Join the discussion.
MCU & Boards
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: Disable socket buffer. Increase available SRAM
by lawrence WIZnet ·
Hello, pherig
As you know 32KB sram assigned in 8 ch socket and we offer users the registers to control the socket buffer size.
In Reference Sheet, there are Sn_TXBUF_SIZE and Sn_RXBUF_SIZE registers.
So, may you set all sockets 0Byte then you will use MAX 48KB.
Thank you
lawrence
RE: Disable socket buffer. Increase available SRAM
by pherig ·
Thanks for answering lawrence and for the information shared.
I have developed a function that allocates memory until malloc answer null in order to measure how much memory is still available and even though I change Sn_TXBUF_SIZE and Sn_RXBUF_SIZE registers, the result is always the same (~8KB). Is this happening because the memories are not a single-memory of 48KB and the heap cannot use two different memories at the same time?
Do I have to change the Read/Write Memory Areas at Keil (memory remap) in order to be able to use the extra memory released from the sockets?
I assume there are two SRAMs: 16KB and 32KB. Is this correct? If so, can I have 3 sockets enabled (3 x [2KB + 2KB] = 12KB) and assign the remaining 20KB of the extra memory for Heap?
Thanks again.
Regards,
Pedro
RE: Disable socket buffer. Increase available SRAM
by pherig ·
Adding more details:
I have been able to change the scatter file and the .s file in order to change the memory map, but I don’t know what changes should be done.
My goal is to have a single ram with 48Kb but in the worst scenario I could work with segmented rams if the stack is not in the main one.
Based in the documentation, I tried to add a new ram and move the initial_stacker_pointer to an address in the new ram but I didn’t manage to understand what should be this new address. I believe this information is in the W7500P Reference Manual Version 1.0.3 ( Figure 5. Register & Memory Organization pg 43) but I didn’t understand it. Can some one please support me?
RE: RE: Disable socket buffer. Increase available SRAM
by lawrence WIZnet ·
Hello, pherig
I think one of ways to use is user have to set the 32K memory(socket) as SRAM in IDE.
In KEIL, there is the configuration tool for setting SRAM, more than one.
Because it is separated from main SRAM.
RE: Disable socket buffer. Increase available SRAM
by 8milan8 ·
[quote=“pherig”]Adding more details:
I have been able to change the scatter file and the .s file in order to change the memory map, but I don’t know what changes should be done.
My goal is to have a single ram with 48Kb but in the worst scenario I could work with segmented rams if the stack is not in the main one.
Based in the documentation, I tried to add a new ram and move the initial_stacker_pointer to an address in the new ram but I didn’t manage to understand what should be this new address. I believe this information is in the W7500P Reference Manual Version 1.0.3 ( Figure 5. Register & Memory Organization pg 43) but I didn’t understand it. Can some one please support me?[/quote]
Read reference manual section 7.4. But after reading, I think that the parameter 48 KB SRAM are crap. You can’t simple use this memory. The first problem is that the memory is separated from the main SRAM. So it could be used only for the heap and the limited use. But i not tried it.
I wanted to use TLS, but now I know that there is only 16 KB of SRAM, so it will not work. I wish they did next generation of this chip that will repair the problems (RTC and add main SRAM memory).
RE: Disable socket buffer. Increase available SRAM
by Bagler ·
Lawrence, thank you for your answers,
Can you please give some more detailed explanations of reference manual Figure 5, section 7.4. What address should be used to access Socket 7 TX buffer for instance?
Thanks in advance!
RE: RE: Disable socket buffer. Increase available SRAM
by pherig ·
I did several tests and the only one that worked for me was the following linker settings:
But this settings only increase 2kb in the available RAM and I had to reduce the maximum number of sockets available.
Hope this helps someone in the future.
RE: RE: Disable socket buffer. Increase available SRAM
by barcaluti ·
Hi everybody
Thanks for sharing your thoughts! I know it´s a bit old, but just in case...
Didn´t you have problems using this TOE RAM such as some memory areas (in TOE RAM section) overwritting other areas (in TOE RAM section, but different socket)?
I´m afraid I´m not understanding something. In my case, I defined two memory sections:
SOCKET7_TX_RAM: origin 0x461EF800, length 2K
SOCKET6_TX_RAM: origin 0x461AF800, length 2K
I´m placing some variables in SOCKET7_TX_RAM and some others in SOCKET6_TX_RAM. While debugging, I can see that writing variables in SOCKET7_TX_RAM overwrites variables in SOCKET6_TX_RAM (those placed at the same offset with respect to the origin of the section, that is, to the origin of the TX buffer).
Did you experience something similar?
Thanks in advance.