When doing CIR reading in PDOA mode 3, several registers/sub-registers values need modification. But I cannot find a way to modify them. I tried using functions like dwt_modify32bitoffsetreg, but it seems they are not defined in the header files, and I get an undefined reference error. Indeed I cannot find them in deca_device_api.h.
Am I missing something? Or is there another way to modify the values in the registers/sub-registers?
I’m using QM33120WDK1 kit by the way.
If you’re using QM33120WDK1, I would suggest that you look to QM33100 User Manual since some registers may have different adress compared to DW3000.
For the register you’re looking for, the adress did not change:
I need to use dwt_readaccdata() with STS mode and PDOA mode 3. In this case, since the offset is 1024 and 1536 for the two CIR sequences, I need to use an indirect SPI read. That is to say, set PTR_ADDR_A and PTR_ADDR_B to 0x15, set PTR_OFFSET_A to 1024, PTR_OFFSET_B to 1536, and INDIRECT_PRT_A, INDIRECT_PRT_B to normal (how to use it by the way?).
If that is correct, after all the settings, I need to call dwt_readaccdata(). But what is the sampleOffset now ?
Tried your example and the reading part works like a charm. Tried some different registers to verify the default values were correct. But when I try writing back new values nothing seems to happen? I do a second read just like the first after writing and then the original (default) values are back. Both ioctl(Read) / ioctl(Write) returns 0. Isn’t the last data parameter in your example missing a “&” (“void *)data” → “void *)&data”), still nothing happens just curious? Do I need to unlock writing somehow, or apply it for it to take effect?