random number generator (TRNG) API ?

Yup, you can do that way.

In this case we have only one used bit in the register, so its easy, but sometime we have registers with dozen used bits, and i use 0xFFFFFFFF to avoid an infinite chain of OR'ed constants.

In this case, maybe, we can also avoid to disable the interrupts at all (since the default is disabled and we never turn it on).
C