RTEMS 6.1-rc4
|
This source file contains the I/O Multiplexing Module (IOMM) support implementation. More...
Functions | |
RTEMS_STATIC_ASSERT (TMS570_PIN_CLEAR_RQ_MASK==TMS570_PIN_FNC_CLEAR<< TMS570_PIN_FNC_SHIFT, TMS570_PIN_CONFIG) | |
void | tms570_bsp_pin_set_function (int pin_num, int pin_fnc) |
select desired function of pin/ball | |
void | tms570_bsp_pin_clear_function (int pin_num, int pin_fnc) |
clear connection between pin and specified peripherals/function | |
void | tms570_bsp_pin_config_one (uint32_t pin_num_and_fnc) |
configure one pin according to its function specification | |
void | tms570_bsp_pinmmr_config (const uint32_t *pinmmr_values, int reg_start, int reg_count) |
configure block or whole pin multiplexer | |
void | tms570_pin_config_prepare (void) |
Prepares a pin configuration sequence. | |
void | tms570_pin_config_apply (uint32_t config) |
Applies a pin configuration. | |
void | tms570_pin_config_array_apply (const uint32_t *config, size_t count) |
Applies a pin configuration array. | |
void | tms570_pin_config_complete (void) |
Completes a pin configuration sequence. | |
This source file contains the I/O Multiplexing Module (IOMM) support implementation.
void tms570_bsp_pin_clear_function | ( | int | pin_num, |
int | pin_fnc | ||
) |
clear connection between pin and specified peripherals/function
This function switches off given connection and leaves rest of multiplexer setup intact.
[in] | pin_num | pin/ball identifier (index into pinmux array) |
[in] | pin_fnc | function number 0 .. 7, if value TMS570_PIN_FNC_AUTO is specified then pin function is extracted from pin_num argument |
Void |
void tms570_bsp_pin_config_one | ( | uint32_t | pin_num_and_fnc | ) |
configure one pin according to its function specification
The function setups multiplexer to interconnect pin with specified function/peripheral. Predefined values for pins combined with function are in a format TMS570_BALL_ column
row
function
(for example TMS570_BALL_W3_SCIRX
). If the function can be connected to more pins then specification includes infomation which allows to disconnect alternative pin to peripheral input connection or switch input multiplexer to right pin.
[in] | pin_num_and_fnc | pin function descriptor is build by macro TMS570_PIN_AND_FNC which takes pin/pinmmr specification build by TMS570_BALL_WITH_MMR and function index in output multiplexer. If the peripheral can be connected to other input alternative then actual pin description and alternative to disconnected/reconnect are combined together by TMS570_PIN_WITH_IN_ALT macro. If clear of alternative connection is required then flag TMS570_PIN_CLEAR_RQ_MASK is ored to alternative description. |
Void |
void tms570_bsp_pin_set_function | ( | int | pin_num, |
int | pin_fnc | ||
) |
select desired function of pin/ball
The function setups multiplexer to interconnect pin with specified function/peripheral. Pin number is index into pinmux entries array. Predefined values for pins are in a format TMS570_BALL_ column
row
(for example TMS570_BALL_N19
). The multiplexer allows to interconnect one pin to multiple signal sources/sinks in the theory but it is usually bad choice. The function sets only specified function and clears all other connections.
[in] | pin_num | pin/ball identifier (index into pinmux array), |
[in] | pin_fnc | function number 0 .. 7, if value TMS570_PIN_FNC_AUTO is specified then pin function is extracted from pin_num argument |
Void |
void tms570_bsp_pinmmr_config | ( | const uint32_t * | pinmmr_values, |
int | reg_start, | ||
int | reg_count | ||
) |
configure block or whole pin multiplexer
Function change multiplexer content. It is intended for initial chip setup and does not use locking. If complete reconfiguration is required at runtime then it is application responsibility to protect and serialize change with peripherals drivers and parallel calls
[in] | pinmmr_values | pointer to array with required multiplexer setup |
[in] | reg_start | starting register, this allows to configure non-consecutive registers groups found on some MCU family members |
[in] | reg_count | number of words in initialization array to set to corresponding registers |
Void |
void tms570_pin_config_apply | ( | uint32_t | config | ) |
Applies a pin configuration.
This function can only be used if the pin configuration was prepared by tms570_pin_config_prepare().
config | is the pin configuration defined by TMS570_PIN_AND_FNC() or TMS570_PIN_WITH_IN_ALT(). |
void tms570_pin_config_array_apply | ( | const uint32_t * | config, |
size_t | count | ||
) |
Applies a pin configuration array.
This function can only be used if the pin configuration was prepared by tms570_pin_config_prepare().
config | is the pin configuration array. Calls tms570_pin_config_apply() for each pin configuration in the array. |
count | is the element count of the pin configuration array. |
void tms570_pin_config_prepare | ( | void | ) |
Prepares a pin configuration sequence.
Use tms570_pin_config_apply() to apply pin configurations. Use tms570_pin_config_complete() to complete the pin configuration sequence.