This channel provides basic to advance tutorial of IOT, ESP32 and ARM based controller.You will get here Code and schematic diagram without any charges.
Embedded-Knowledge
We had been debugging for hours. The system would freeze randomly. No crash. No logs. Justโฆ dead silence. Was it the hardware? Was it power? Race conditions? ISR timing? ๐๐จ Just a simple line like this: ๐๐๐๐๐(๐๐๐๐ == 0); And we forgot one keyword: ๐ ๐๐จ๐ฅ๐๐ญ๐ข๐ฅ๐ The compiler optimized the check out. It assumed the value of flag wouldnโt change. But it didโinside an interrupt. And we never told the compiler. ๐๐ก๐๐ญ ๐๐จ๐๐ฌ ๐ฝ๐๐๐๐๐๐๐ ๐ซ๐๐๐ฅ๐ฅ๐ฒ ๐ฆ๐๐๐ง? It says: "๐ป๐๐๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐. ๐ซ๐๐'๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐. ๐ฑ๐๐๐ ๐๐๐๐๐ ๐๐ ๐๐-๐๐, ๐๐๐๐๐๐." ๐๐ก๐๐ง ๐ฒ๐จ๐ฎ ๐๐๐๐ ๐ฎ๐ฌ๐ ๐ฏ๐จ๐ฅ๐๐ญ๐ข๐ฅ๐: Variables updated in ISRs Hardware register access Shared flags between threads/tasks DMA-updated memory That one missing keyword cost us days of debugging. It was a lesson for life.
7 months ago | [YT] | 1
View 0 replies
Embedded-Knowledge
We had been debugging for hours.
The system would freeze randomly. No crash. No logs. Justโฆ dead silence.
Was it the hardware?
Was it power?
Race conditions?
ISR timing?
๐๐จ
Just a simple line like this:
๐๐๐๐๐(๐๐๐๐ == 0);
And we forgot one keyword:
๐ ๐๐จ๐ฅ๐๐ญ๐ข๐ฅ๐
The compiler optimized the check out.
It assumed the value of flag wouldnโt change.
But it didโinside an interrupt.
And we never told the compiler.
๐๐ก๐๐ญ ๐๐จ๐๐ฌ ๐ฝ๐๐๐๐๐๐๐ ๐ซ๐๐๐ฅ๐ฅ๐ฒ ๐ฆ๐๐๐ง?
It says:
"๐ป๐๐๐ ๐๐๐๐๐๐๐๐ ๐๐๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐. ๐ซ๐๐'๐ ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐. ๐ฑ๐๐๐ ๐๐๐๐๐ ๐๐ ๐๐-๐๐, ๐๐๐๐๐๐."
๐๐ก๐๐ง ๐ฒ๐จ๐ฎ ๐๐๐๐ ๐ฎ๐ฌ๐ ๐ฏ๐จ๐ฅ๐๐ญ๐ข๐ฅ๐:
Variables updated in ISRs
Hardware register access
Shared flags between threads/tasks
DMA-updated memory
That one missing keyword cost us days of debugging.
It was a lesson for life.
7 months ago | [YT] | 1
View 0 replies