diff --git a/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h b/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h index 44ededfb15d4..d05de4de1c05 100644 --- a/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h +++ b/sys/dev/bhnd/cores/pmu/bhnd_pmureg.h @@ -30,7 +30,7 @@ #define BHND_PMU_GET_BITS(_value, _field) \ (((_value) & _field ## _MASK) >> _field ## _SHIFT) #define BHND_PMU_SET_BITS(_value, _field) \ - (((_value) & _field ## _MASK) >> _field ## _SHIFT) + (((_value) << _field ## _SHIFT) & _field ## _MASK) #define BHND_PMU_ILP_CLOCK 32000 /**< default ILP freq */ #define BHND_PMU_ALP_CLOCK 20000000 /**< default ALP freq */