cancel
Showing results for 
Search instead for 
Did you mean: 

Enabling CPU caching degrades the sensing of DS18B20.

KPanc.3
Associate

I am using STM32F767ZIT for sensing of temperature using DS18B20 and displaying it on a 5 inch LCD using STemwin. My problem is that when CPU caching is enabled the DS18B20 is unable to fetch any reading(it shows 4095.5 °C which false reading) while when caching is disabled it works perfectly fine. I am using microsecond delay generation using timers of STM32 for temp sensing.

3 REPLIES 3
Uwe Bonnes
Principal III

Revisit your code. look where variables are placed, double check if you use DMA.

KPanc.3
Associate

Means how it affects the placement?? All my variables are stack variables(local function scoped) only.

So is the problem difference in speed or cache coherency?

Using DMA?

What does the signal look like on a scope?

Confirm timing/delay loops with GPIO toggle

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..