NHS31xx SW API
dp: board support for the Demo PCB

Detailed Description

The Demo PCB is the promoted HW board for the evaluation of NHS31xx family ICs along with the respective SDK.

The Demo PCB provides a couple of features, which are exposed at SW level:

The initialization function performs initialization of the LED and adds the correct pulls to all the PIOs.

Board support concept:
Board support comes in the form of a statically-linked library which includes the bare minimum for an application to start the HW properly (IO pin configuration and/or clock configuration if required) as well as SW support for the features provided by the board. There is a single function that is part of the board support API: the board initialization function (Board_Init). The board initialization has two distinct purposes. In one hand, to ensure that IO pin configuration and state are set to a harmless state for the respective board. On the other hand that the features provided by the board (LEDs, external memories, etc) are properly initialized in SW and ready to be used directly by the application. Whenever board support is needed for a different board (different pin layout, reduced/extended feature set, etc), a separate board library must be created, matching the requirements of the new board. As long as the initialization function prototype (Board_Init) and the design is kept consistent between board APIs, applications may switch boards more easily during development or even be run on different boards without changing any code.
Diversity
This board makes use of some higher level modules which support diversity: where possible, the default values have been kept. Necessary overrides have been made in Board diversity overrides.

Modules

 Board diversity overrides
 

Macros

#define BOARD_DP
 
#define BOARD_ENABLE_WAKEUP
 

Functions

void Board_Init (void)
 
#define BOARD_PIO0_PULL   IOCON_RMODE_PULLUP
 
#define BOARD_PIO1_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO2_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO3_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO4_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO5_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO6_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO7_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO8_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO9_PULL   IOCON_RMODE_PULLUP /* When using pin9 for UARTTX, a pull-up prevents undesired 'break' conditions. */
 
#define BOARD_PIO10_PULL   IOCON_RMODE_PULLDOWN
 
#define BOARD_PIO11_PULL   IOCON_RMODE_PULLDOWN
 

Macro Definition Documentation

◆ BOARD_DP

#define BOARD_DP

A unique define for the Development PCB. Applications or modules can use this define to enable/disable code at compile time based on the board being used.

◆ BOARD_PIO0_PULL

#define BOARD_PIO0_PULL   IOCON_RMODE_PULLUP

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO1_PULL

#define BOARD_PIO1_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO2_PULL

#define BOARD_PIO2_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO3_PULL

#define BOARD_PIO3_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO4_PULL

#define BOARD_PIO4_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO5_PULL

#define BOARD_PIO5_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO6_PULL

#define BOARD_PIO6_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO7_PULL

#define BOARD_PIO7_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO8_PULL

#define BOARD_PIO8_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO9_PULL

#define BOARD_PIO9_PULL   IOCON_RMODE_PULLUP /* When using pin9 for UARTTX, a pull-up prevents undesired 'break' conditions. */

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO10_PULL

#define BOARD_PIO10_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_PIO11_PULL

#define BOARD_PIO11_PULL   IOCON_RMODE_PULLDOWN

Depending on the peripherals on the board, power consumption is minimized by adding pull-ups or -downs on the digital pins. These are added at startup in Board_Init and should have these pulls when the pins are not in use.

Note
possible values are IOCON_RMODE_PULLDOWN, IOCON_RMODE_PULLUP or IOCON_RMODE_INACT (no pull).

◆ BOARD_ENABLE_WAKEUP

#define BOARD_ENABLE_WAKEUP

If defined, a push button or similar is attached to PIO0 and can wake up the IC when in Deep Power Down.

Function Documentation

◆ Board_Init()

void Board_Init ( void  )

Sets up and initializes all required blocks and functions related to the board hardware.

Note
Initialization will add pulls according to BOARD_PIO0_PULL, BOARD_PIO1_PULL and so on, to the default IO pin configuration.
Initialization does not change the system clock configuration.
Precondition
This function may be only called once, may be only called after a hard reset, and must be called as soon as possible.
Postcondition
LED module is initialized.
These chip level drivers are initialized and ready for use:
Note
This function may be called before Startup_VarInit has been called.