Skip to main content
KPanc.3
Associate
May 1, 2021
Question

Enabling CPU caching degrades the sensing of DS18B20.

  • May 1, 2021
  • 3 replies
  • 926 views

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.

This topic has been closed for replies.

3 replies

Uwe Bonnes
Chief
May 2, 2021

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

KPanc.3
KPanc.3Author
Associate
May 2, 2021

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

Tesla DeLorean
Guru
May 2, 2021

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..