In the DW3000 user manual the register REG:11:04 – CLK_CTRL – PMSC clock control register lists bits 11 and 12 as reserved and should always be 0.
In the DW3000 driver the function dwt_force_clocks() contains the code
if (clocks == FORCE_CLK_SYS_TX)
{
uint16_t regvalue0 = CLK_CTRL_TX_BUF_CLK_ON_BIT_MASK | CLK_CTRL_RX_BUF_CLK_ON_BIT_MASK;
//SYS_CLK_SEL = PLL
regvalue0 |= ((uint16_t) FORCE_SYSCLK_PLL) << CLK_CTRL_SYS_CLK_SEL_BIT_OFFSET;
//TX_CLK_SEL = ON
regvalue0 |= ((uint16_t) FORCE_CLK_PLL) << CLK_CTRL_TX_CLK_SEL_BIT_OFFSET;
dwt_write16bitoffsetreg(CLK_CTRL_ID, 0x0, regvalue0);
}
The two lines forcing the clock mode match up with the user manual however given the #defines in the header file of
#define CLK_CTRL_TX_BUF_CLK_ON_BIT_MASK 0x1000U
#define CLK_CTRL_RX_BUF_CLK_ON_BIT_MASK 0x800U
this code is also setting bits 11 and 12, bits that the user manual indicates should never be set.
So which is it? Are these bits reserved or do they need to be enabled when entering CW mode?
My guess is that the driver is correct and the manual is missing the required information. But how many other omissions like this are there? If the manual is missing information like this what use is it?
The supplied source code clearly indicates that more detailed internal documentation exists, other registers are made up of various flags in the source code while the manual contains a fixed magic number to use. While I understand that the full internal documentation can’t be published it would be nice to at least have documents with enough information to use the part and create drivers for it.
When can we expect a user manual that actually includes all the information required to drive the chip?