It is obviously some configuration issue, but I cannot figure out what is the problem.
I start the socket as a TCP server and I can connect from client normally. But when I try to send one char from server to client, client receives some garbage stream.
I have set:
- tx mem size (0x001B) as 0x55 (2kb per socket)
- tx write pointer 0x0424 = 0x40
0x0425 = 0x00
when sending a char i first read the txWritePtr, one example is:
0x0424 => 0xD8
0x0425 => 0x90
Then i mask the pointer with 0x7ff and add to base addess 0x4000, which gives me address of 0x4090 on which I sent one character.
And after I update txWritePtr with new address
0x0424 = 0x40
0x0425 = 0x91
And of course send the Send command to command register. After that I receive quite amount of garbage (I dont really know how much characters I receive)…
I am sure it is some obvious mistake I am making, but longer I read the datasheet and look at the code, less I have ideas what could be the issue…
Thanks in advance.