I recently noticed that my conversion time was not always calculating properly for different DIG_FILT and OSR settings. This led me to find a potential error in cache_t struct in the .h file.
The ALL_DIRTY_MASK reads as binary 1000. I believe it should be 0111, to track the three setting registers, and whether the current cache information is accurate.
Some other hints I found along the way:
Line 70 does not update with 1000: cache.dirty |= cache_t::ALL_DIRTY_MASK & (1<<address);
Line 78 is always being anded with 0:
cache.dirty &= ~(1 << address);
Hello,
I recently noticed that my conversion time was not always calculating properly for different DIG_FILT and OSR settings. This led me to find a potential error in cache_t struct in the .h file.
The ALL_DIRTY_MASK reads as binary 1000. I believe it should be 0111, to track the three setting registers, and whether the current cache information is accurate.
Some other hints I found along the way: Line 70 does not update with 1000:
cache.dirty |= cache_t::ALL_DIRTY_MASK & (1<<address);
Line 78 is always being anded with 0:
cache.dirty &= ~(1 << address);
I changed the struct to:
To get a binary mask of 0111. Conversion at higher data rates seems to be working better for me this way.