MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
mtif

Functions

void MTIF_enablePulseGen (uint16_t baseAddress)
 Enables Pulse Generator. More...
 
void MTIF_disablePulseGen (uint16_t baseAddress)
 Disables Pulse Generator. More...
 
void MTIF_clearPulseGenCounter (uint16_t baseAddress)
 Pulse Generator pulse counter clear. More...
 
void MTIF_setPulseGenPulseGridFreq (uint16_t baseAddress, uint8_t freq)
 Pulse Generator pulse grid frequency select. More...
 
void MTIF_setPulseGenCountNum (uint16_t baseAddress, uint8_t num)
 Set Pulse Count Number. More...
 
void MTIF_clearPulseKCountUpdateRequest (uint16_t baseAddress)
 Pulse K-Count Update Request. More...
 
void MTIF_clearPulseGridFreqUpdateRequest (uint16_t baseAddress)
 Pulse Grid Frequency Update Request. More...
 
void MTIF_setPulseKCountUpdateAck (uint16_t baseAddress)
 Pulse K-Count Update Acknowledge. More...
 
uint16_t MTIF_isPulseKCountUpdated (uint16_t baseAddress)
 Is Pulse K-Count Updated? More...
 
void MTIF_setPulseGridFreqUpdateAck (uint16_t baseAddress)
 Pulse Grid Frequency Update Acknowledge. More...
 
uint16_t MTIF_isPulseGridFreqUpdated (uint16_t baseAddress)
 Is Pulse Pulse Grid Frequency Updated? More...
 
void MTIF_enablePulseCounter (uint16_t baseAddress)
 PC sub module enable. More...
 
void MTIF_disablePulseCounter (uint16_t baseAddress)
 PC sub module disable. More...
 
void MTIF_clearPulseCounter (uint16_t baseAddress)
 Pulse counter clear. More...
 
uint16_t MTIF_getPulseCount (uint16_t baseAddress)
 Pulse Counter value register. More...
 
void MTIF_setPulseCounterReadRequest (uint16_t baseAddress)
 Pulse Counter Read Request. More...
 
void MTIF_setPulseCounterReadAck (uint16_t baseAddress)
 Pulse counter read acknowledge. More...
 
uint16_t MTIF_isPulseCounterReadReady (uint16_t baseAddress)
 Is Pulse Counter value ready to read?. More...
 
uint16_t MTIF_getPulseCounterOverflow (uint16_t baseAddress)
 Pulse counter overflow. More...
 
void MTIF_ackPulseCounterOverflow (uint16_t baseAddress)
 Acknowledge pulse counter overflow. More...
 
void MTIF_enableTestPortOutput (uint16_t baseAddress)
 Enables test port output. More...
 
void MTIF_disableTestPortOutput (uint16_t baseAddress)
 Disables test port output. More...
 
void MTIF_enableTestPortInput (uint16_t baseAddress)
 Enables test port input. More...
 
void MTIF_disableTestPortInput (uint16_t baseAddress)
 Disables test port input. More...
 
void MTIF_setPulseGeneratorAsPulseCounterInput (uint16_t baseAddress)
 Test port input select for pulse counter, sourced from pulse generator. More...
 
void MTIF_setTestPortInputTerminalAsPulseCounterInput (uint16_t baseAddress)
 Test port input select for pulse counter, sourced from test port input terminal. More...
 
void MTIF_enableTestPortTerminalActivationBySW (uint16_t baseAddress)
 Test port terminal enable activation by software. More...
 
void MTIF_enableTestPortTerminalActivationBySWAndHW (uint16_t baseAddress)
 Test port terminal enable activation by software and hardware. More...
 

Detailed Description

Function Documentation

§ MTIF_ackPulseCounterOverflow()

void MTIF_ackPulseCounterOverflow ( uint16_t  baseAddress)

Acknowledge pulse counter overflow.

This function acknowledges an overflow of the pulse counter since the last read request procedure. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_clearPulseCounter()

void MTIF_clearPulseCounter ( uint16_t  baseAddress)

Pulse counter clear.

Clears the pulse counter (PC has to be disabled to perform a clear). Note!: A clear request is being latched and released after the clear is executed. LFXTOFF=1 and PCEN=0 will prevent that. The clear occurs then after the clock is reenabled. This bit is for triggering only; it's state cannot be read back Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_clearPulseGenCounter()

void MTIF_clearPulseGenCounter ( uint16_t  baseAddress)

Pulse Generator pulse counter clear.

Clears the pulse generator. (PGEN has to be set to one to perform a clear). Note!: A clear request is being latched and released after the clear is executed. MTIF_disablePulseGen (PCEN=0) and LFXTOFF=1 will prevent that. The clear occurs then after the clock is reenabled. Clear reset by PUC.

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_clearPulseGridFreqUpdateRequest()

void MTIF_clearPulseGridFreqUpdateRequest ( uint16_t  baseAddress)

Pulse Grid Frequency Update Request.

The update of PGFS occurs during the frequency grid slot 0xff (e.g. in the last 4ms of an second with an pulse grid frequency of 256Hz). Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_clearPulseKCountUpdateRequest()

void MTIF_clearPulseKCountUpdateRequest ( uint16_t  baseAddress)

Pulse K-Count Update Request.

The update of KVAL occurs during the frequency grid slot 0xff (e.g. in the last 4ms of a second with a pulse grid frequency of 256Hz). Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_disablePulseCounter()

void MTIF_disablePulseCounter ( uint16_t  baseAddress)

PC sub module disable.

This bit disables the PC sub module when set to zero. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_disablePulseGen()

void MTIF_disablePulseGen ( uint16_t  baseAddress)

Disables Pulse Generator.

Disable the PG sub module

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_disableTestPortInput()

void MTIF_disableTestPortInput ( uint16_t  baseAddress)

Disables test port input.

Disable the test input port. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_disableTestPortOutput()

void MTIF_disableTestPortOutput ( uint16_t  baseAddress)

Disables test port output.

Disable the test pulse output. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enablePulseCounter()

void MTIF_enablePulseCounter ( uint16_t  baseAddress)

PC sub module enable.

This bit enables the PC sub module when set to one. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enablePulseGen()

void MTIF_enablePulseGen ( uint16_t  baseAddress)

Enables Pulse Generator.

Enable the PG sub module

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enableTestPortInput()

void MTIF_enableTestPortInput ( uint16_t  baseAddress)

Enables test port input.

Enable the test input port. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enableTestPortOutput()

void MTIF_enableTestPortOutput ( uint16_t  baseAddress)

Enables test port output.

Enable the test pulse output. Reset type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enableTestPortTerminalActivationBySW()

void MTIF_enableTestPortTerminalActivationBySW ( uint16_t  baseAddress)

Test port terminal enable activation by software.

The test port output is enabled solely by TPOE (enabled if TPOE=1) test port output enabled. Reset Type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_enableTestPortTerminalActivationBySWAndHW()

void MTIF_enableTestPortTerminalActivationBySWAndHW ( uint16_t  baseAddress)

Test port terminal enable activation by software and hardware.

The test port output requires both TPOE (enabled if TPOE=1) test port output enabled, and MTPE pin to be high, to be enabled. Reset Type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_getPulseCount()

uint16_t MTIF_getPulseCount ( uint16_t  baseAddress)

Pulse Counter value register.

Get count value from the pulse counter.

Parameters
baseAddressis the base address of the MTIF module.
Returns
16-bit count value from pulse counter

§ MTIF_getPulseCounterOverflow()

uint16_t MTIF_getPulseCounterOverflow ( uint16_t  baseAddress)

Pulse counter overflow.

This bit indicates an overflow of the pulse counter when its value changes since the last read request procedure. It is basically the 17th bit of the counter Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
Valid values are:
  • MTIF_PULSE_COUNTER_OVERFLOW
  • MTIF_PULSE_COUNTER_NOT_OVERFLOW

§ MTIF_isPulseCounterReadReady()

uint16_t MTIF_isPulseCounterReadReady ( uint16_t  baseAddress)

Is Pulse Counter value ready to read?.

This function will let you know if Pulse Counter value is updated and ready to read as a response to the Pulse Counter Read Request. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
Valid values are:
  • MTIF_PULSE_COUNTER_READY_TO_READ
  • MTIF_PULSE_COUNTER_NOT_READY_TO_READ

§ MTIF_isPulseGridFreqUpdated()

uint16_t MTIF_isPulseGridFreqUpdated ( uint16_t  baseAddress)

Is Pulse Pulse Grid Frequency Updated?

This checks whether Pulse Grid Frequency has been updated. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
Valid values are:
  • MTIF_PULSE_GRID_FREQUENCY_IS_UPDATED
  • MTIF_PULSE_GRID_FREQUENCY_IS_NOT_UPDATED

§ MTIF_isPulseKCountUpdated()

uint16_t MTIF_isPulseKCountUpdated ( uint16_t  baseAddress)

Is Pulse K-Count Updated?

This checks whether Pulse K-Count has been updated. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
Valid values are:
  • MTIF_K_COUNT_IS_UPDATED
  • MTIF_K_COUNT_IS_NOT_UPDATED

§ MTIF_setPulseCounterReadAck()

void MTIF_setPulseCounterReadAck ( uint16_t  baseAddress)

Pulse counter read acknowledge.

This acknowledges the update of the PCR register as response to the PCRR read request. Note!: A read request is being latched. LFXTOFF=1 and PCEN=0 will prevent that.The read will then be performed and acknowledged after the clock is reenabled. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_setPulseCounterReadRequest()

void MTIF_setPulseCounterReadRequest ( uint16_t  baseAddress)

Pulse Counter Read Request.

Requests an update of PCR read register from the actual counter. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_setPulseGenCountNum()

void MTIF_setPulseGenCountNum ( uint16_t  baseAddress,
uint8_t  num 
)

Set Pulse Count Number.

This register value determines how many pulses are generated withing 256 periods of the pulse grid frequency(with password protection as in PGCNF). PGEN has to be one to perform a change. Reset by PUC.

Parameters
baseAddressis the base address of the MTIF module.
numis the logical OR of any of the following:
  • MTIF_KVAL_BIT0
  • MTIF_KVAL_BIT1
  • MTIF_KVAL_BIT2
  • MTIF_KVAL_BIT3
  • MTIF_KVAL_BIT4
  • MTIF_KVAL_BIT5
  • MTIF_KVAL_BIT6
Returns
None

§ MTIF_setPulseGeneratorAsPulseCounterInput()

void MTIF_setPulseGeneratorAsPulseCounterInput ( uint16_t  baseAddress)

Test port input select for pulse counter, sourced from pulse generator.

Pulse generator is used as input for test port of pulse counter Reset Type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_setPulseGenPulseGridFreq()

void MTIF_setPulseGenPulseGridFreq ( uint16_t  baseAddress,
uint8_t  freq 
)

Pulse Generator pulse grid frequency select.

This value determines at which time grid pulses are generated. The pulse generator frame frequency is an 1/256th of this (PGEN has to be one to perform a change). Reset by PUC.

Parameters
baseAddressis the base address of the MTIF module.
freqis the specified pulse grid frequency select. Valid values are:
  • MTIF_PULSE_GRID_FREQUENCY_8HZ
  • MTIF_PULSE_GRID_FREQUENCY_16HZ
  • MTIF_PULSE_GRID_FREQUENCY_32HZ
  • MTIF_PULSE_GRID_FREQUENCY_64HZ
  • MTIF_PULSE_GRID_FREQUENCY_128HZ
  • MTIF_PULSE_GRID_FREQUENCY_256HZ
  • MTIF_PULSE_GRID_FREQUENCY_512HZ
  • MTIF_PULSE_GRID_FREQUENCY_1024HZ [Default]
Returns
None

§ MTIF_setPulseGridFreqUpdateAck()

void MTIF_setPulseGridFreqUpdateAck ( uint16_t  baseAddress)

Pulse Grid Frequency Update Acknowledge.

This acknowledges a PGUR directly after the PGFS has been updated. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_setPulseKCountUpdateAck()

void MTIF_setPulseKCountUpdateAck ( uint16_t  baseAddress)

Pulse K-Count Update Acknowledge.

This acknowledges a PCUR directly after the K-values has been updated. Reset type: PUC

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

§ MTIF_setTestPortInputTerminalAsPulseCounterInput()

void MTIF_setTestPortInputTerminalAsPulseCounterInput ( uint16_t  baseAddress)

Test port input select for pulse counter, sourced from test port input terminal.

Test port input terminal is used as input for test port of pulse counter Reset Type: POR

Parameters
baseAddressis the base address of the MTIF module.
Returns
None

Copyright 2020, Texas Instruments Incorporated