Variables that are shared between threads should be typed volatile.
Also you need to insure access to variables is atomic. A context switch can happen during a multi-byte fetch or store.
See count in the the chBlinkPrint example.
Variables that are shared between threads should be typed volatile.
Also you need to insure access to variables is atomic. A context switch can happen during a multi-byte fetch or store.
See count in the the chBlinkPrint example.