Difficulty setting registers on the DWT3000

I am currently using the DWM3000 and an STM32 NUCLEO-F429 board for some UWB SS-TWR measurements. I am using the ss_twr_initiator.c and ss_twr_responder.c examples for the tag and anchor, respectively.
I have encountered some issues while trying to set certain registers.
The following code is what I use to write to a specific register:

	// Define COMP_DLY em RX_CAL para 0x2 - Sub-register 0x04:0C RX calibration configuration
	uint8_t COMP_DLY_BUF[3];
	uint8_t COMP_DLY_MASK1 = 0b11110000;
	uint8_t COMP_DLY_MASK2 = 0b00000010;

	dwt_readfromdevice(0x04, 0x0C, 3, COMP_DLY_BUF);
	COMP_DLY_BUF[2] = (COMP_DLY_BUF[2] & COMP_DLY_MASK1) | COMP_DLY_MASK2;
	dwt_writetodevice(0x04, 0x0C, 3, COMP_DLY_BUF);

	// Define LDO_RLOAD para 0x14 - Sub-register 0x07:48 – LDO load
	uint8_t LDO_RLOAD_VALUE = 0x14;
	dwt_writetodevice(0x07, 0x51, 1, LDO_RLOAD_VALUE);

This is an resume of the intire code, that contains a lot more registers to set.
To verify that i wrote correctly in the register, i use the following code:

	uint8_t buffer[1];
	dwt_readfromdevice(0x07, 0x51, 1, buffer);

However, when I check the read value, it returns zero.
I am not sure what I did wrong, could someone help me with this issue?