This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SENSE Value Mismatch?

Over the past few months I have worked extensively on a few different projects that all utilize the nRF51422. In some recent debugging of GPIO issues (both relating to SENSE mechanism and GPIOTE module) I have discovered an inconsistency between the "nRF51 Series Reference Manual" (v1.1) and the reference code provided in the Nordic SDK.

Referencing the manual, chapter 13 (GPIO), section 13.2.8, description of the PIN_CNF[n] fields, field "E" (SENSE):

"RW SENSE Pin sensing mechanism DISABLED 0 Disabled HIGH 1 Sense for high level LOW 2 Sense for low level"

However, notice the provided reference code differs: #define GPIO_PIN_CNF_SENSE_High (0x02UL) /*!< Wakeup on high level. / #define GPIO_PIN_CNF_SENSE_Low (0x03UL) /!< Wakeup on low level. */

Other projects that I've worked on utilize the SENSE mechanism using the reference code values shown above - those work as expected so I'm guessing this is just a typo in the reference manual?

It almost seems as if the upper bit is a SENSE enable/disable bit, while the lower bit determines if high or low level SENSing is desired.

I appreciate any clarification on this. Thanks!

Related