nRF5 SDK v17.1.0
Macros
PWM peripheral driver configuration

Macros

#define NRFX_PWM_ENABLED
 Set to 1 to activate. More...
 
#define NRFX_PWM0_ENABLED
 Enable PWM0 instance. More...
 
#define NRFX_PWM1_ENABLED
 Enable PWM1 instance. More...
 
#define NRFX_PWM2_ENABLED
 Enable PWM2 instance. More...
 
#define NRFX_PWM3_ENABLED
 Enable PWM3 instance. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_OUT0_PIN
 Out0 pin. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_OUT1_PIN
 Out1 pin. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_OUT2_PIN
 Out2 pin. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_OUT3_PIN
 Out3 pin. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_BASE_CLOCK
 Base clock. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_COUNT_MODE
 Count mode. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_TOP_VALUE
 Top value. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_LOAD_MODE
 Load mode. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_STEP_MODE
 Step mode. More...
 
#define NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY
 Interrupt priority. More...
 
#define NRFX_PWM_CONFIG_LOG_ENABLED
 Enables logging in the module. More...
 
#define NRFX_PWM_CONFIG_LOG_LEVEL
 Default Severity level. More...
 
#define NRFX_PWM_CONFIG_INFO_COLOR
 ANSI escape code prefix. More...
 
#define NRFX_PWM_CONFIG_DEBUG_COLOR
 ANSI escape code prefix. More...
 
#define NRFX_PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED
 Enables nRF52 Anomaly 109 workaround for PWM. More...
 
#define NRFX_PWM_NRF52_ANOMALY_109_EGU_INSTANCE
 EGU instance used by the nRF52 Anomaly 109 workaround for PWM. More...
 

Detailed Description

Macro Definition Documentation

#define NRFX_PWM0_ENABLED

Enable PWM0 instance.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM1_ENABLED

Enable PWM1 instance.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM2_ENABLED

Enable PWM2 instance.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM3_ENABLED

Enable PWM3 instance.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_CONFIG_DEBUG_COLOR

ANSI escape code prefix.

Following options are available:

  • 0 - Default
  • 1 - Black
  • 2 - Red
  • 3 - Green
  • 4 - Yellow
  • 5 - Blue
  • 6 - Magenta
  • 7 - Cyan
  • 8 - White
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_CONFIG_INFO_COLOR

ANSI escape code prefix.

Following options are available:

  • 0 - Default
  • 1 - Black
  • 2 - Red
  • 3 - Green
  • 4 - Yellow
  • 5 - Blue
  • 6 - Magenta
  • 7 - Cyan
  • 8 - White
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_CONFIG_LOG_ENABLED

Enables logging in the module.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_CONFIG_LOG_LEVEL

Default Severity level.

Following options are available:

  • 0 - Off
  • 1 - Error
  • 2 - Warning
  • 3 - Info
  • 4 - Debug
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_BASE_CLOCK

Base clock.

Following options are available:

  • 0 - 16 MHz
  • 1 - 8 MHz
  • 2 - 4 MHz
  • 3 - 2 MHz
  • 4 - 1 MHz
  • 5 - 500 kHz
  • 6 - 250 kHz
  • 7 - 125 kHz
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_COUNT_MODE

Count mode.

Following options are available:

  • 0 - Up
  • 1 - Up and Down
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_IRQ_PRIORITY

Interrupt priority.

Following options are available:

  • 0 - 0 (highest)
  • 1 - 1
  • 2 - 2
  • 3 - 3
  • 4 - 4 (Applicable devices only)
  • 5 - 5 (Applicable devices only)
  • 6 - 6 (Applicable devices only)
  • 7 - 7 (Applicable devices only)
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_LOAD_MODE

Load mode.

Following options are available:

  • 0 - Common
  • 1 - Grouped
  • 2 - Individual
  • 3 - Waveform
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_OUT0_PIN

Out0 pin.

Minimum value: 0 Maximum value: 31

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_OUT1_PIN

Out1 pin.

Minimum value: 0 Maximum value: 31

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_OUT2_PIN

Out2 pin.

Minimum value: 0 Maximum value: 31

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_OUT3_PIN

Out3 pin.

Minimum value: 0 Maximum value: 31

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_STEP_MODE

Step mode.

Following options are available:

  • 0 - Auto
  • 1 - Triggered
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_DEFAULT_CONFIG_TOP_VALUE

Top value.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_ENABLED

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_NRF52_ANOMALY_109_EGU_INSTANCE

EGU instance used by the nRF52 Anomaly 109 workaround for PWM.

Following options are available:

  • 0 - EGU0
  • 1 - EGU1
  • 2 - EGU2
  • 3 - EGU3
  • 4 - EGU4
  • 5 - EGU5
Note
This is an NRF_CONFIG macro.
#define NRFX_PWM_NRF52_ANOMALY_109_WORKAROUND_ENABLED

Enables nRF52 Anomaly 109 workaround for PWM.

The workaround uses interrupts to wake up the CPU and ensure it is active when PWM is about to start a DMA transfer. For initial transfer, done when a playback is started via PPI, a specific EGU instance is used to generate the interrupt. During the playback, the PWM interrupt triggered on SEQEND event of a preceding sequence is used to protect the transfer done for the next sequence to be played.

Set to 1 to activate.

Note
This is an NRF_CONFIG macro.

Documentation feedback | Developer Zone | Subscribe | Updated