LPCOpen v2.10 Brown Out Detect (BOD) issues for LPC40xx

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by AndyMcC on Fri Dec 12 03:06:27 MST 2014
The LPCOpen v2.10 release notes for the LPC17xx/LCP40xx at http://www.lpcware.com/content/project/lpcopen-software-development-platform-nxp-lpc-microcontrollers/lpcopen-lpc17xx state:

Known issues (Carry-Over)
•The BOD (Brown Out Detector) example doesn’t seem to work on the LPC1788 and LPC408.

The header file: sysctl_17xx_40xx.h has the inline functions: Chip_SYSCTL_EnableBOD(), Chip_SYSCTL_DisableBOD(), Chip_SYSCTL_EnableBODReset() and Chip_SYSCTL_DisableBODReset(), which contain bit polarity errors in that bits are set when they should be cleared and vice versa.

From the LPC 407x/408x user manual (UM10562), section Power Mode Control register:

3 BOGD Brown-Out Global Disable.
When BOGD is 1, the Brown-Out Detect circuitry is fully disabled at all times, and does not consume power.
When BOGD is 0, the Brown-Out Detect circuitry is enabled.
See the System Control Block chapter for details of Brown-Out detection.
Note: the Brown-Out Reset Disable (BORD, in this register) and the Brown-Out Interrupt (see Section 5.1) must be disabled when software changes the value of this bit.

4 BORD Brown-Out Reset Disable.
When BORD is 1, the BOD will not reset the device when the VDD(REG)(3V3) voltage dips goes below the BOD reset trip level. The Brown-Out interrupt is not affected.
When BORD is 0, the BOD reset is enabled.
See the Section 3.6 for details of Brown-Out detection.

The attached file has corrected, commented versions of these inline functions.

Original Attachment has been moved to: sysctl_17xx_40xx_awm.h.zip