Forum Discussion
Altera_Forum
Honored Contributor
16 years agoThe code seems to be correct, provided the direct access to memory doesn't corrupt any data (are code/stack/etc. stored on ddr2, too?)
I'm concerned about the 218 value you get for the free buffer space. Since your sss_exec_command function immediately processes ALL the recvd data you should always have: conn->rx_wr_pos-conn->rx_buffer<=1400 If you set SSS_RX_BUF_SIZE to 4000, you MUST have free_space>=2600 Probably you have an error in the handle_receive function, where the buffer is managed and used data is released. Did you modify the template code? Anyway, since you process immediately all the received data there's a much more efficient way to do this job. You don't need the standard code with rd and wr pointers in the rx buffer, but you can simply use a plain rx buffer >1400 bytes long, like in the previous echo example. After the recv(), you copy it directly to you memory. This is what I indeed use and it's much efficient, safer and faster. Regard