Possible endianess issue in dwt_readdiagnostics() in deca_device.c

Dear All,

I have identified a possible endianness issue in dwt_readdiagnostics() call in the deca_device.c. The implementation works on Little-endian CPUs (ARM MCU by default), while does not work on Big-endian platforms, uint16 RX diagnostic values have rotated bytes for diagnostics->stdNoise, diagnostics->firstPathAmp2, diagnostics->firstPathAmp3, and diagnostics->maxGrowthCIR.

The reason is that the diagnostics C structure is cast to uint8*, which is OK for Little-endian for the HW, but not for the other.

Best Regards,

Tamas Kovacshazy

Hi Tamas,

Good catch.
You right, this is a bug in the dwt_readdiagnostics() function.

Decawave will fix it.