Actions

EmSys

Tm4clib-pwm-defines

From EdWiki

The following defines are passed to pwm_gen_configure() as the ui32Config parameter.

PWM_GEN_MODE_DOWN

#define PWM_GEN_MODE_DOWN 0x00000000 /* Down count mode */

PWM_GEN_MODE_UP_DOWN

#define PWM_GEN_MODE_UP_DOWN 0x00000002 /* Up/Down count mode */

PWM_GEN_MODE_SYNC

#define PWM_GEN_MODE_SYNC 0x00000038 /* Synchronous updates */

PWM_GEN_MODE_NO_SYNC

#define PWM_GEN_MODE_NO_SYNC 0x00000000 /* Immediate updates */

WM_GEN_MODE_DBG_RUN

#define PWM_GEN_MODE_DBG_RUN 0x00000004 /* Continue running in debug mode */

PWM_GEN_MODE_DBG_STOP

#define PWM_GEN_MODE_DBG_STOP 0x00000000 /* Stop running in debug mode */

PWM_GEN_MODE_FAULT_LATCHED

#define PWM_GEN_MODE_FAULT_LATCHED 0x00040000 /* Fault is latched */

PWM_GEN_MODE_FAULT_UNLATCHED

#define PWM_GEN_MODE_FAULT_UNLATCHED 0x00000000 /* Fault is not latched */

PWM_GEN_MODE_FAULT_MINPER

#define PWM_GEN_MODE_FAULT_MINPER 0x00020000 /* Enable min fault period */

PWM_GEN_MODE_FAULT_NO_MINPER

#define PWM_GEN_MODE_FAULT_NO_MINPER 0x00000000 /* Disable min fault period */

PWM_GEN_MODE_FAULT_EXT

#define PWM_GEN_MODE_FAULT_EXT 0x00010000 /* Enable extended fault support */

PWM_GEN_MODE_FAULT_LEGACY

#define PWM_GEN_MODE_FAULT_LEGACY 0x00000000 /* Disable extended fault support */

PWM_GEN_MODE_DB_NO_SYNC

#define PWM_GEN_MODE_DB_NO_SYNC 0x00000000 /* Deadband updates occur immediately */

PWM_GEN_MODE_DB_SYNC_LOCAL

#define PWM_GEN_MODE_DB_SYNC_LOCAL 0x0000A800 /* Deadband updates locally synchronized */

PWM_GEN_MODE_DB_SYNC_GLOBAL

#define PWM_GEN_MODE_DB_SYNC_GLOBAL 0x0000FC00 /* Deadband updates globally synchronized */

PWM_GEN_MODE_GEN_NO_SYN

#define PWM_GEN_MODE_GEN_NO_SYNC 0x00000000 /* Generator mode updates occur immediately */

PWM_GEN_MODE_GEN_SYNC_LOCAL

#define PWM_GEN_MODE_GEN_SYNC_LOCAL 0x00000280 /* Generator mode updates locally synchronized */

PWM_GEN_MODE_GEN_SYNC_GLOBAL

#define PWM_GEN_MODE_GEN_SYNC_GLOBAL 0x000003C0 /* Generator mode updates globally synchronized */

Defines for enabling, disabling, and clearing PWM generator interrupts and triggers.

PWM_INT_CNT_ZERO

#define PWM_INT_CNT_ZERO 0x00000001 /* Int if COUNT = 0 */

PWM_INT_CNT__LOAD

#define PWM_INT_CNT__LOAD 0x00000002 /* Int if COUNT = LOAD */

PWM_INT_CNT_AU

#define PWM_INT_CNT_AU 0x00000004 /* Int if COUNT = CMPA U */

PWM_INT_CNT_AD

#define PWM_INT_CNT_AD 0x00000008 /* Int if COUNT = CMPA D */

PWM_INT_CNT_BU

#define PWM_INT_CNT_BU 0x00000010 /* Int if COUNT = CMPA U */

PWM_INT_CNT_BD

#define PWM_INT_CNT_BD 0x00000020 /* Int if COUNT = CMPA D */

PWM_TR_CNT_ZERO

#define PWM_TR_CNT_ZERO 0x00000100 /* Trig if COUNT = 0 */

PWM_TR_CNT_LOAD

#define PWM_TR_CNT_LOAD 0x00000200 /* Trig if COUNT = LOAD */

PWM_TR_CNT_AU

#define PWM_TR_CNT_AU 0x00000400 /* Trig if COUNT = CMPA U */

PWM_TR_CNT_AD

#define PWM_TR_CNT_AD 0x00000800 /* Trig if COUNT = CMPA D */

PWM_TR_CNT_BU

#define PWM_TR_CNT_BU 0x00001000 /* Trig if COUNT = CMPA U */

PWM_TR_CNT_BD

#define PWM_TR_CNT_BD 0x00002000 /* Trig if COUNT = CMPA D */

Defines for enabling, disabling, and clearing PWM interrupts.

PWM_INT_GEN_0

#define PWM_INT_GEN_0 0x00000001 /* Generator 0 interrupt */

PWM_INT_GEN_1

#define PWM_INT_GEN_1 0x00000002 /* Generator 1 interrupt */

PWM_INT_GEN_2

#define PWM_INT_GEN_2 0x00000004 /* Generator 2 interrupt */

PWM_INT_GEN_3

#define PWM_INT_GEN_3 0x00000008 /* Generator 3 interrupt */

PWM_INT_FAULT0

#define PWM_INT_FAULT0 0x00010000 /* Fault0 interrupt */

PWM_INT_FAULT1

#define PWM_INT_FAULT1 0x00020000 /* Fault1 interrupt */

PWM_INT_FAULT2

#define PWM_INT_FAULT2 0x00040000 /* Fault2 interrupt */

PWM_INT_FAULT3

#define PWM_INT_FAULT3 0x00080000 /* Fault3 interrupt */

PWM_INT_FAULT_M

#define PWM_INT_FAULT_M 0x000F0000 /* Fault interrupt source mask */

Defines to identify the PWM generators within a module.

PWM_GEN_0

#define PWM_GEN_0 0x00000040 /* Offset address of Gen0 */

PWM_GEN_1

#define PWM_GEN_1 0x00000080 /* Offset address of Gen1 */

PWM_GEN_2

#define PWM_GEN_2 0x000000C0 /* Offset address of Gen2 */

PWM_GEN_3

#define PWM_GEN_3 0x00000100 /* Offset address of Gen3 */

PWM_GEN_0_BIT

#define PWM_GEN_0_BIT 0x00000001 /* Bit-wise ID for Gen0 */

PWM_GEN_1_BIT

#define PWM_GEN_1_BIT 0x00000002 /* Bit-wise ID for Gen1 */

PWM_GEN_2_BIT

#define PWM_GEN_2_BIT 0x00000004 /* Bit-wise ID for Gen2 */

PWM_GEN_3_BIT

#define PWM_GEN_3_BIT 0x00000008 /* Bit-wise ID for Gen3 */

PWM_GEN_EXT_0

#define PWM_GEN_EXT_0 0x00000800 /* Offset of Gen0 ext address range */

PWM_GEN_EXT_1

#define PWM_GEN_EXT_1 0x00000880 /* Offset of Gen1 ext address range */

PWM_GEN_EXT_2

#define PWM_GEN_EXT_2 0x00000900 /* Offset of Gen2 ext address range */

PWM_GEN_EXT_3

#define PWM_GEN_EXT_3 0x00000980 /* Offset of Gen3 ext address range */

Defines to identify the outputs within a module.

PWM_OUT_0

#define PWM_OUT_0 0x00000040 /* Encoded offset address of PWM0 */

PWM_OUT_1

#define PWM_OUT_1 0x00000041 /* Encoded offset address of PWM1 */

PWM_OUT_2

#define PWM_OUT_2 0x00000082 /* Encoded offset address of PWM2 */

PWM_OUT_3

#define PWM_OUT_3 0x00000083 /* Encoded offset address of PWM3 */

PWM_OUT_4

#define PWM_OUT_4 0x000000C4 /* Encoded offset address of PWM4 */

PWM_OUT_5

#define PWM_OUT_5 0x000000C5 /* Encoded offset address of PWM5 */

PWM_OUT_6

#define PWM_OUT_6 0x00000106 /* Encoded offset address of PWM6 */

PWM_OUT_7

#define PWM_OUT_7 0x00000107 /* Encoded offset address of PWM7 */

PWM_OUT_0_BIT

#define PWM_OUT_0_BIT 0x00000001 /* Bit-wise ID for PWM0 */

PWM_OUT_1_BIT

#define PWM_OUT_1_BIT 0x00000002 /* Bit-wise ID for PWM1 */

PWM_OUT_2_BIT

#define PWM_OUT_2_BIT 0x00000004 /* Bit-wise ID for PWM2 */

PWM_OUT_3_BIT

#define PWM_OUT_3_BIT 0x00000008 /* Bit-wise ID for PWM3 */

PWM_OUT_4_BIT

#define PWM_OUT_4_BIT 0x00000010 /* Bit-wise ID for PWM4 */

PWM_OUT_5_BIT

#define PWM_OUT_5_BIT 0x00000020 /* Bit-wise ID for PWM5 */

PWM_OUT_6_BIT

#define PWM_OUT_6_BIT 0x00000040 /* Bit-wise ID for PWM6 */

PWM_OUT_7_BIT

#define PWM_OUT_7_BIT 0x00000080 /* Bit-wise ID for PWM7 */

Defines to identify each of the possible fault trigger conditions in PWM_FAULT_GROUP_0.

PWM_FAULT_GROUP_0

#define PWM_FAULT_GROUP_0 0

PWM_FAULT_FAULT0

#define PWM_FAULT_FAULT0 0x00000001

PWM_FAULT_FAULT1

#define PWM_FAULT_FAULT1 0x00000002

PWM_FAULT_FAULT2

#define PWM_FAULT_FAULT2 0x00000004

PWM_FAULT_FAULT3

#define PWM_FAULT_FAULT3 0x00000008

PWM_FAULT_ACMP0

#define PWM_FAULT_ACMP0 0x00010000

PWM_FAULT_ACMP1

#define PWM_FAULT_ACMP1 0x00020000

PWM_FAULT_ACMP2

#define PWM_FAULT_ACMP2 0x00040000

Defines to identify each of the possible fault trigger conditions in PWM_FAULT_GROUP_1.

PWM_FAULT_GROUP_1

#define PWM_FAULT_GROUP_1 1

PWM_FAULT_DCMP0

#define PWM_FAULT_DCMP0 0x00000001

PWM_FAULT_DCMP1

#define PWM_FAULT_DCMP1 0x00000002

PWM_FAULT_DCMP2

#define PWM_FAULT_DCMP2 0x00000004

PWM_FAULT_DCMP3

#define PWM_FAULT_DCMP3 0x00000008

PWM_FAULT_DCMP4

#define PWM_FAULT_DCMP4 0x00000010

PWM_FAULT_DCMP5

#define PWM_FAULT_DCMP5 0x00000020

PWM_FAULT_DCMP6

#define PWM_FAULT_DCMP6 0x00000040

PWM_FAULT_DCMP7

#define PWM_FAULT_DCMP7 0x00000080

Defines to identify the sense of each of the external FAULTn signals

PWM_FAULT0_SENSE_HIGH

#define PWM_FAULT0_SENSE_HIGH 0x00000000

PWM_FAULT0_SENSE_LOW

#define PWM_FAULT0_SENSE_LOW 0x00000001

PWM_FAULT1_SENSE_HIGH

#define PWM_FAULT1_SENSE_HIGH 0x00000000

PWM_FAULT1_SENSE_LOW

#define PWM_FAULT1_SENSE_LOW 0x00000002

PWM_FAULT2_SENSE_HIGH

#define PWM_FAULT2_SENSE_HIGH 0x00000000

PWM_FAULT2_SENSE_LOW

#define PWM_FAULT2_SENSE_LOW 0x00000004

PWM_FAULT3_SENSE_HIGH

#define PWM_FAULT3_SENSE_HIGH 0x00000000

PWM_FAULT3_SENSE_LOW

#define PWM_FAULT3_SENSE_LOW 0x00000008

Defines passed to pwm_output_update_mode() to identify the synchronization mode to use when enabling or disabling outputs using pwm_output_state().

PWM_OUTPUT_MODE_NO_SYNC

#define PWM_OUTPUT_MODE_NO_SYNC 0x00000000 /* Updates to occur immediately */

PWM_OUTPUT_MODE_SYNC_LOCAL

#define PWM_OUTPUT_MODE_SYNC_LOCAL 0x00000002 /* Updates are locally synchronized */

PWM_OUTPUT_MODE_SYNC_GLOBAL

#define PWM_OUTPUT_MODE_SYNC_GLOBAL 0x00000003 /* Updates are globally synchronized */