Skip to main content
LMorr.3
Senior
Jun 4, 2023 2:31 PM UTC
Solved

How to use CMSIS to set a bit or register

Each time I call SET_BIT to set a bit the register value remains at 0. All registers are 0 even after writing, as though they are read-only. For example, the following does not set the bit:

DMA2_Stream0->CR |= ((uint32_t)1);

What am I missing?

Thank you!

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 4, 2023 2:58 PM UTC

>>What am I missing?

Probably a clock

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

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Jun 4, 2023 2:58 PM UTC

>>What am I missing?

Probably a clock

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
LMorr.3
LMorr.3Author
Senior
Jun 4, 2023 3:05 PM UTC

Yep, that was it, thank you!