MCUXpresso SDK Documentation

lpc_bod

lpc_bod#

Overview#

The bod example shows how to use LPC BOD(Brown-out detector) in the simplest way. To run this example, user should remove the jumper for the power source selector, and connect the adjustable input voltage to the MCU’s Vin pin. If the input voltage of the Vin pin is lower than the threshold voltage, the BOD interrupt will be asserted.

Supported Boards#

LPCXpresso51U68
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso51u68 board

  • Personal Computer

Board settings

Remove jumper for JP9, connect the external input voltage to JP9_2.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 3.05V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 3.05V.

LPCXpresso54628
Hardware requirements
  • Micro USB cable

  • LPCXpresso54628 board

  • Personal Computer

Board settings

No special settings are required.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD driver example in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 3.05V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 3.05V.

Open JP4(5-6) and then input voltagge will low than 3.05V

LPCXpresso54S018
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso54S018 board

  • Personal Computer

Board settings

Remove jumper for JP4, connect the external input voltage to JP4_6.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.86V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.86V.

LPCXpresso54S018M
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso54S018m board

  • Personal Computer

Board settings

Remove jumper for JP4, connect the external input voltage to JP4_6.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.86V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.86V.

LPCXpresso55S06
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S06 board

  • Personal Computer

Board settings

Remove jumper for JP22, connect the external input voltage to JP22_2.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.0V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.0V.

LPCXpresso55S16
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S16 board

  • Personal Computer

Board settings

Remove jumper for JP22, connect the external input voltage to JP22_2.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.0V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.0V.

LPCXpresso55S28
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S28 board

  • Personal Computer

Board settings

Remove jumper for P4, connect the external input voltage to P4_2.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.0V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.0V.

LPCXpresso55S69
Hardware requirements
  • Mini/micro USB cable

  • LPCXpresso55S69 board

  • Personal Computer

Board settings

Remove jumper for P4, connect the external input voltage to P4_2.

Prepare the Demo

Note: MCUXpresso IDE project default debug console is semihost

  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (P6) on the board

  2. Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.0V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.0V.

LPCXpresso802
Toolchain supported
  • IAR embedded Workbench 8.11.3

  • Keil MDK 5.23

  • MCUXpresso10.1.0

Hardware requirements
  • Micro USB cable

  • LPCXpresso802 board

  • Personal Computer

Board settings

Remove jumpers for JP1 , connect adjustable input voltage to JP1-2.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP port(CN2 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

###### Expected Result
The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE. Please adjust input voltage low than 2.52V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.52V.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LPCXpresso804
Hardware Requirements
  • Mini/micro USB cable

  • LPCXpresso804 board

  • Personal Computer

Board Settings

Remove jumpers for JP7 and JP8, connect adjustable input voltage to JP8-2.

Run the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP port(CN2 on the board).

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Choose an IDE, building the project and download the program to the target board. More information about how to compile and program the project can refer to the

    [Getting Started with MCUXpresso SDK](../../../../docs/Getting Started with MCUXpresso SDK.pdf).

  4. Launch the debugger in your IDE to begin running the demo.

Expected Result

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.24V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.24V.
LPCXpresso845MAX
Toolchain supported
  • IAR embedded Workbench 8.50.5

  • Keil MDK 5.31

  • GCC ARM Embedded 9.2.1

  • MCUXpresso 11.2.0

Hardware Requirements
  • Mini/micro USB cable

  • LPCXpresso845MAX board

  • Personal Computer

Board settings

Remove the SJ6. Connect the adjustable input voltage to JP2-1.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.66V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.66V.

Note:When the BOD demo is started, the analog voltage input of the JP2_1 pin should be 3.3v. After running the demo, adjust the analog voltage input according to the prompts to trigger the BOD interrupt.

LPCXpresso860MAX
Toolchain supported
  • IAR embedded Workbench 8.50.5

  • Keil MDK 5.31

  • GCC ARM Embedded 9.2.1

  • MCUXpresso 11.2.0

Hardware Requirements
  • Micro USB cable

  • LPCXpresso860MAX board

  • Personal Computer

Board settings

Remove the R51. Connect the adjustable input voltage to JP2-1.

Prepare the Demo
  1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J4) on the target board.

  2. Open a serial terminal with the following settings:

    • 9600 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

The log below shows the output of the BOD demo in the terminal window:

BOD INTERRUPT EXAMPLE.
Please adjust input voltage low than 2.66V to trigger BOD interrupt.

BOD interrupt occurred, input voltage is low than 2.66V.

Note:When the BOD demo is started, the analog voltage input of the JP2_1 pin should be 3.3v. After running the demo, adjust the analog voltage input according to the prompts to trigger the BOD interrupt.