MACRAW mode, can't seem to move ptr location.

I’m using STM32 connected via spi and trying to operate in raw mode. To make use of FreeRTOS+ TCP functions. Everything appears to be going good accept for 1 slight niggle i can’t get around.
First, i reset the chip, -> use setSHAR to set mac -> read back mac to make sure it stuck using getSHAR.
so far so good. Then i set raw mode and check it stuck.

    uint8_t sn = 0;
setSn_CR(sn,Sn_CR_CLOSE);
setSn_MR(sn, (Sn_MR_MACRAW | (0 & 0xF0)));
setSn_CR(sn,Sn_CR_OPEN);

HAL_Delay(10);

if (getSn_SR(sn) != SOCK_MACRAW)
{
	// Failed to put socket 0 into MACRaw mode
	return false;
}

this is fine.
Then i listen to the network by polling getSn_RX_RSR(sn);
When there is some data in the buffer i read the first to bytes to get length.
Then try to read out of the buffer one packet at a time. but here is where i fall over. I can’t for the life of me figure out how to move the ptr on the chip. i need to move it to the start of the next packet and in the example it shows something like this.

uint8_t sock_num = 0;
uint16_t data_len = 0;
uint16_t dummyPort = 0;
uint16_t ptr = 0;
uint8_t mFlag = 0;
uint32_t addrsel = 0;

ptr = getSn_RX_RD(sn);
addrsel = ((uint32_t)ptr << 8) + (WIZCHIP_RXBUF_BLOCK(sn) << 3);
data_len = WIZCHIP_READ(addrsel);
ptr++;
addrsel = ((uint32_t)ptr << 8) + (WIZCHIP_RXBUF_BLOCK(sn) << 3);
data_len = ((data_len<<8) + WIZCHIP_READ(addrsel)) - 2;
ptr++;

if(data_len > 1514)
{
 //recommand : close and open - something went wrong to get here
	setSn_CR(sn,Sn_CR_CLOSE);
	setSn_MR(sn, (Sn_MR_MACRAW | (0 & 0xF0)));
	setSn_CR(sn,Sn_CR_OPEN);
	return 0;
}

if(data_len > getSn_RX_RSR(sn))
{
 //not a full packet in buffer
 return 0;
}

IINCHIP_WRITE(Sn_RX_RD(sock_num),(uint8_t)((ptr & 0xff00) >> 8));
IINCHIP_WRITE(Sn_RX_RD(sock_num),(uint8_t)(ptr & 0x00ff));

uint16_t ptr_test = getSn_RX_RD(sock_num);

if (ptr != ptr_test)
{
	//HardFault_Handler();
}

return data_len;

The idea of the above code it to move the ptr 2 bytes and get the length of the frame so that freertos can collect and process 1 ethernet frame at a time without the 2 byte header, and without running into the next frame. nibbling down the 16kb buffer frame by frame. But as you can see by my reading back the ptr, it doesn’t move and always returns 0. The only way to get it to change is to call Sn_CR_RECV. but that moves the pointer too far. All the way to the end of whatever is in the buffer. I may have understood something wrong and require your correction. Please Help and thanks in advance.

Solved. You do have to call RECV to make the pointer stick. this works.

    setSn_RX_RD(sn,ptr);
    setSn_CR(sn,Sn_CR_RECV); // this should make the new pointer stick.

This wasn’t working with my setup. my fault.

IINCHIP_WRITE(Sn_RX_RD(sock_num),(uint8_t)((ptr & 0xff00) >> 8));
IINCHIP_WRITE(Sn_RX_RD(sock_num),(uint8_t)(ptr & 0x00ff));