Can I modify the value of ucir in my application? If yes, How to do it?
Can I modify the value of ucir in my application? If yes, How to do it?
Yes you can, simply write to UICR->xxx
address (must be 32-bit aligned and better not overwrite some significant registers;)
Your code is correct, I have tested it and get correct reading. Note that UICR registers are located in flash, and it can take up to 338 us to write one word. Try adding a short delay before reading back the value, to make sure it have enough time to be written to flash.
Your code is correct, I have tested it and get correct reading. Note that UICR registers are located in flash, and it can take up to 338 us to write one word. Try adding a short delay before reading back the value, to make sure it have enough time to be written to flash.