3 ms·
I think you're missing 'volatile's in your casts
by Taniwha 8y ago
I think you're missing 'volatile's in your casts
- foxhill 8y agowhy would you need that in this case?
- saagarjha 8y agoProbably so the compiler doesn't just optimize out the statements, seeing as they don't seem to have a visible effect on the program execution because they're never read again.
- Taniwha 8y agobecause writing to one location causes the data to change in another (a system register) you don't want the compiler to assume that data in an IO register can be cached in a CPU register
- cnvogel 8y agoThe examples should only view the bit/address mapping, not be a complete example on how to access memory mapped peripherals.