Hardware Mapping Peripherals for Texas Instruments C2000 Processors Properties
Select the configurations for the peripherals in the model deployed to the hardware board
Since R2022b
The peripheral configurations for devices listed in the Hardware Mapping tool for Texas Instruments C2000 processors appear in the selected block in the Browser > Peripherals. This table shows the association between the driver block, simulation interface block, and Hardware Mapping tool hardware configuration.
Driver Block | Interface Block | Hardware Configuration |
---|---|---|
ADC Read | ADC Interface | ADC |
PWM Write | PWM Interface | PWM |
ADC
Module
— Hardware ADC Module
A
(default) | B
| C
| D
Select the ADC module A
through
D
on the hardware board.
Start of conversion
— Start of conversion trigger
SOC0
(default) | SOC0
| ... | SOC15
Identify the start-of-conversion trigger by number.
Resolution
— Resolution of digital conversion
12-bit (Single-ended input)
(default) | 16-bit (Differential inputs)
Select the resolution of the digital conversion output.
Conversion channel
— Input channel to apply ADC
Internal
(default) | Undefined
| Interrupt name
Select the input channel to which this ADC conversion applies.
SOCx Acqusition window (cycles)
— Length of ADC acquisition period
positive scalar integer
Define the length of the acquisition period in ADC clock cycles. The value of this
parameter depends on the SYSCLK
and the minimum ADC sample
time.
SOCx Trigger source
— SoC trigger source
Software
| Timer x
TINTx
n
| GPIO ADCEXTSOC
| ePWMx
ADCSOCA
x
TINTx
nx
ADCSOCASelect the event source that triggers the start of the conversion.
ADCINT will trigger SOCx
— Use ADCINT
interrupt to trigger start of conversion
No ADCINT
(default) | ADCINT1
| ADCINT2
At the end of conversion, use the ADCINT1
or
ADCINT2
interrupt to trigger a start of conversion. This
loop creates a continuous sequence of conversions. The default selection,
No ADCINT
disables this parameter. To set the interrupt,
select the Post interrupt at EOC
trigger option, and choose
the appropriate interrupt.
Enable interrupt at EOC
— Enable post interrupts when the ADC triggers end of conversion pulses
false
(default) | true
Enable post interrupts when the ADC triggers EOC pulses. When you select this option, the dialog box displays the Interrupt selection and Interrupt continuous mode options.
Interrupt selection
— ADC interrupt selection
ADCINT1
(default) | ADCINT2
| ADCINT3
| ADCINT4
Select which ADCINT
interrupt the ADC
posts to after triggering an EOC pulse.#
Interrupt continuous mode
— Generate new EOC signal overriding previous interrupt flag status
false
(default) | true
When the ADC generates an end of conversion (EOC) signal, generate an
ADCINT
interrupt, whether the
previous interrupt flag has been acknowledged or not.#
PWM
PWM Module
— Indicates which ePWM
module to use
ePWM1
(default) | ePWM2
| ... | ePWMx
x
Select the appropriate ePWM
module,
ePWM
x
, where x
is a
positive integer.
High speed clock divider
— High speed time base clock prescaler divider HSPCLKDIV
1
(default) | 2
| 4
| 6
| 8
| 10
| 12
| 14
Set the high speed time base clock prescaler divider,
HSPCLKDIV
.
Timerbase clock divider
— Time base clock TBCLK
prescaler divider corresponding to CLKDIV
1
(default) | 2
| 4
| 8
| 16
| 32
| 64
| 128
Use the Time base clock, TBCLK
, prescaler divider,
CLKDIV
, and the high speed time base clock,
HSPCLKDIV
, prescaler divider, HSPCLKDIV
, to
configure the Time-base clock speed, TBCLK
, for the
ePWM
module. Calculate TBCLK
using this
equation: TBCLK = PWM clock/(HSPCLKDIV * CLKDIV)
.
For example, the default values of both CLKDIV
and
HSPCLKDIV
are 1, and the default frequency of PWM clock is 200 MHz,
so: TBCLK
in Hz = 200 MHz/(1 * 1) = 200 MHz TBCLK
in seconds = 1/TBCLK
in Hz = 1/200 MHz = 0.005 μs.
Period (clock cycles)
— Period of ePWM
counter
1
(default) | 2
| 4
| 8
| 16
| 32
| 64
| 128
Set the period of the ePWM
counter waveform.
The timer period is in clock cycles:
Count Mode | Calculation | Example |
---|---|---|
Up or down | The value entered in clock cycles is used to calculate time-base period,
TBPRD , for the ePWM timer register. The
period of the ePWM timer is TCTR = (TBPRD + 1) *
TBCLK , where TCTR is the timer period in seconds,
and TBCLK is the time-base clock. | For |
Up-down | The value entered in clock cycles is used to calculate the time-base
period, TBPRD , for the ePWM timer
register. The period of the ePWM timer is TCTR = 2 *
TBPRD * TBCLK , where TCTR is the timer period in
seconds and TBCLK is the time-base clock. | For EPWMCLK frequency = 200 MHz and
TBCLK = 5 ns. When the timer period is entered in clock
cycles, TBPRD = 10000, and the ePWM timer
period is calculated as TCTR = 100 µs. For the default action
settings on the ePWM x tab, the
ePWM period = 100 µs. |
The initial duty cycle of the waveform from the time the PWM peripheral starts operation until the ePWM input port receives a new value for the duty cycle is Timer period / 2.
Initialize CMPx
count (clock cycles)
— Initialize the CMPx
count
0
(default) | positive integer
x
count (clock cycles)x
Set the initial count value of the comparator in clock cycles.
Enable phase offset
— Enable the timer phase offset
false (default) | true
Enables to provide a timer phase offset value.
Timer phase offset
— Timer phase offset
0
(default) | integer between 0
and 65535
The specified offset value is loaded in the time base counter on a synchronization
event. Enter the phase offset value, TBPHS
, in
TBCLK
cycles from 0 to 65535.
Count mode
— Indicates counting mode of ePWM counter
Up-Down
(default) | Down
| Up
Specify the counting mode of the PWM internal counter. This figure shows three counting waveforms.
Action on counter=zero
— Behavior of action qualifier (AQ) submodule at zero count
Do nothing
(default) | Clear
| Set
| Toggle
This group determines the behavior of the action qualifier (AQ) submodule. The AQ
module determines which events are converted into one of the various action types,
producing the required switched waveforms of the ePWMA
circuit. The
ePWMB
always generates a complement signal of
ePWMA
.
Action on counter=period
— Behavior of action qualifier (AQ) submodule at period count
Do nothing
(default) | Clear
| Set
| Toggle
This group determines the behavior of the Action Qualifier (AQ) submodule. The AQ
module determines which events are converted into one of the various action types,
producing the required switched waveforms of the ePWMA
circuit. The
ePWMB
always generates a complement signal of
ePWMA
.
Action on counter=CMPx
on direction
count
— Behavior of Action Qualifier (AQ) submodule for the comparator (CMP) on for the
given direction count
Clear
(default) | Do nothing
| Set
| Toggle
x
on direction
countThis group determines the behavior of the action qualifier (AQ) submodule. The AQ
module determines which events are converted into one of the various action types,
producing the required switched waveforms of the ePWMA
circuit. The
ePWMB
always generates a complement signal of
ePWMA
.
Enable shadow mode
— Enable the shadow mode
Disable
(default) | Enable
When shadow mode is not enabled, the CMPA
register refreshes
immediately. Provide different reload mode for CMPA
register.
Reload CMPx
register
— Time at which the counter period is reset
Counter equals to zero (CTR=Zero)
(default) | Counter equals to period (CTR=PRD)
| Counter equals to Zero or period (CTR=Zero or
CTR=PRD)
| Freeze
x
registerThe time when the counter period resets based on the following condition:
Counter equals to zero (CTR=Zero)
– Refreshes the counter period when the value of the counter is 0.Counter equals to period (CTR=PRD)
– Refreshes the counter period when the value of the counter is period.Counter equals to Zero or period (CTR=Zero or CTR=PRD)
– Refreshes the counter period when the value of the counter is 0 or period.Freeze
– Refreshes the counter period when the value of the counter is freeze.
ADC Start of conversion for ePWM module
— Trigger condition for an ADC start of the conversion event
Counter equals to zero (CTR=Zero)
(default) | Counter equals to period (CTR=PRD)
| Counter equals to Zero or period (CTR=Zero or
CTR=PRD)
| Disable
| Counter is direction
and equal to
CMPx
direction
and equal to
CMPx
This parameter specifies the counter match condition that triggers an ADC start of the conversion event. The choices are:
Counter equals to zero (CTR=Zero)
– Triggers an ADC start of the conversion event when theePWM
counter reaches 0.Counter equals to period (CTR=PRD)
– Triggers an ADC start of the conversion event when theePWM
counter reaches the period value.Counter equals to Zero or period (CTR=Zero or CTR=PRD)
– Triggers an ADC start of the conversion event when the time base counter,TBCTR
, reaches zero or when the time base counter reaches the period,TBCTR
=TBPRD
.Disable
– Disable ADC start of conversion event.Counter is
– Triggers an ADC start of the conversion event when the counter equals the specified comparator and the counterdirection
and equal to CMPx
direction
is eitherincrementing
ordecrementing
.
ePWM interrupt
— Generate ISR for ePWM
Disable
(default) | Counter equals to zero (CTR=Zero)
| Counter equals to period (CTR=PRD)
| Counter equals to Zero or period (CTR=Zero or
CTR=PRD)
| Counter is direction
and equal to
CMPx
direction
and equal to
CMPx
This parameter registers that an interrupt occurs for the specified event and generates interrupt service routine (ISR) code to be used by the Task Manager. The choices are:
Counter equals to zero (CTR=Zero)
– Generates an ISR for when theePWM
counter reaches 0.Counter equals to period (CTR=PRD)
– Generates an ISR for when theePWM
counter reaches the period value.Counter equals to Zero or period (CTR=Zero or CTR=PRD)
– Generates an ISR for when the time base counter,TBCTR
, reaches zero or when the time base counter reaches the period,TBCTR
=TBPRD
.Disable
– Disable ISR generation.Counter is
– Generates an ISR for when the counter equals the specified comparator and the counterdirection
and equal to CMPx
direction
is eitherincrementing
ordecrementing
.
Dead band (cycles)
— Enables the phase offset
0
(default) | integer between 0
and 65535
This parameter specifies the deadband delay for rising edge and falling edge in time-base clock cycles.
Version History
Introduced in R2022b
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)