W6100 SPI TX

I’ve been working on a driver for STM32F4 to work with W6100 over SPI using MikroC Pro for ARM.
Initially implementing a Telnet server just to get things started.
So far this has been pretty sucessful, can read chip ID etc. set MAC address , IPv4 parameters , establish a TCP connection and receive data from a telnet client.
However it appears that I’m misunderstanding what is required for TX.
As I understand I should:-

  1. Get the TX buffer size for the socket in use by reading Sn_TX_BSR (0x0200)
  2. Check the free size in the socket TX buffer by reading Sn_TX_FSR(0x0204)
  3. Get the buffer start address by reading Sn_TX_WR(0x020C)
  4. Write my TX data to the buffer at the buffer start address.
  5. Write the new buffer start (old buffer start + message size) to socket write pointer Sn_TX_WR(0x020C)
  6. Write ‘send’ command (0x20) to socket Command Register Sn_CR(0x0010)
  7. Poll Sn_CR(0x0010) until ==0

When I do this I get a lot of garbage transmitted, with my message text somewhere towards the end.
It looks like I’m misunderstanding the process, can anybody offer any advice?