I\'m writing some software where each bit must be exact(it\'s for the CPU) so __packed is very important.
typedef union{ uint32_t raw; struct{ unsigned
You don't mention that you are clearing out the bits of the structure beforehand, are you sure you aren't ending up with garbage bits left over in the first case?
// maybe try this page_union_t p = {0};