Here is the list of APIs used for BiSS-C encoder communication protocol
Functions | |
| void | bissc_params_init (bissc_params *params) |
| Initialize the parameters data structure with defaults. More... | |
| bissc_handle | bissc_init (uint32_t index, const bissc_params *bissc_params) |
| Initialize a BiSS-C instance. More... | |
| void | bissc_deinit (bissc_handle handle) |
| De-initialize a BiSS-C instance. More... | |
| int32_t | bissc_command_process (bissc_handle handle) |
| Send the BiSS-C command and wait till firmware acknowledges. More... | |
| int32_t | bissc_command_send (bissc_handle handle) |
| Trigger sending the BiSS-C command in PRU. More... | |
| int32_t | bissc_command_wait (bissc_handle handle) |
| Wait till PRU finishes BiSS-C transaction. More... | |
| int32_t | bissc_get_pos (bissc_handle handle) |
| Get single cycle BiSS-C position data. More... | |
| int32_t | bissc_config_clock (bissc_handle handle, bissc_clk_cfg *clk_cfg) |
| Configure BiSS-C clock configuration into PRU-ICSS register, enable load share (if needed), and indicate firmware to measure the delay again. More... | |
| int32_t | bissc_config_channel (bissc_handle handle, uint8_t mask, uint8_t total_channels) |
| Select channel to be used by BiSS-C receiver. More... | |
| int32_t | bissc_wait_for_fw_initialization (bissc_handle handle, uint32_t loop_count) |
| Wait for BiSS-C receiver firmware to initialize. More... | |
| int32_t | bissc_hw_init (bissc_handle handle) |
| Initialize BiSS-C hardware interface. More... | |
| int32_t | bissc_update_max_proc_delay (bissc_handle handle) |
| Update maximum processing delay value. More... | |
| int32_t | bissc_wait_measure_proc_delay (bissc_handle handle, uint32_t loop_count) |
| Wait for BiSS-C receiver firmware to measure processing time. More... | |
| int32_t | bissc_set_default_initialization (bissc_handle handle) |
| Set default configuration parameters for BiSS-C receiver firmware. More... | |
| int32_t | bissc_update_data_len (bissc_handle handle, uint32_t single_turn_len[], uint32_t multi_turn_len[], uint32_t ch_num) |
| Update data length with encoder bit width for BiSS-C receiver firmware. More... | |
| int32_t | bissc_set_ctrl_cmd_and_process (bissc_handle handle, uint32_t ctrl_cmd[]) |
| Set control command and process the ctrl communication read/write. More... | |
| int32_t | bissc_get_enc_proc_delay (bissc_handle handle) |
| Get measured processing delay of individual channel. More... | |
| int32_t | bissc_calc_clock (bissc_handle handle, bissc_clk_cfg *clk_cfg) |
| Calculate Rx and Tx divisors for given frequency. More... | |
| int32_t | bissc_config_periodic_trigger_cmp_mode (bissc_handle handle) |
| Configure periodic trigger operation mode using IEP compare event. More... | |
| int32_t | bissc_config_host_trigger (bissc_handle handle) |
| Configure host trigger operation mode. More... | |
| uint32_t | bissc_generate_ctrl_cmd (bissc_handle handle, uint8_t ls_ch, uint8_t ctrl_write_status, uint32_t ctrl_reg_address, uint32_t ctrl_reg_data, uint32_t ctrl_enc_id) |
| Generate control communication Hex equivalent command. More... | |
| uint32_t | bissc_get_current_channel (bissc_handle handle, uint32_t ch_idx) |
| Retrieves the current channel in use. More... | |
| uint32_t | bissc_get_total_channels (bissc_handle handle) |
| Retrieves total number of channels configured. More... | |
| int32_t | bissc_clear_data_len (bissc_handle handle) |
| Clears all the encoder resolution parameters. More... | |
| int32_t | bissc_update_clock_freq (bissc_handle handle, uint32_t frequency) |
| Update the operating baud rate as specified by the user. More... | |
| int32_t | bissc_clock_config (bissc_handle handle, uint32_t frequency, uint32_t loop_count) |
| Configure BiSS-C clock frequency. More... | |
| int32_t | bissc_enable_safety (bissc_handle handle, uint32_t enc_num, uint32_t ch_num) |
| Enable Safety for connected BiSS-C encoder. More... | |
| int32_t | bissc_disable_safety (bissc_handle handle) |
| Disable Safety for connected BiSS-C encoder. More... | |
| const bissc_attrs * | bissc_get_attrs (bissc_handle handle) |
| Get pointer to BiSS-C attributes structure. More... | |
| bissc_priv * | bissc_get_priv (bissc_handle handle) |
| Get pointer to BiSS-C private data structure. More... | |
| int32_t | bissc_set_encoder_timeout (bissc_handle handle, uint32_t ch_num, uint32_t encoder_timeout) |
| Set encoder timeout value for a specific channel. More... | |
| uint32_t | bissc_get_encoder_timeout (bissc_handle handle, uint32_t ch_num) |
| Get encoder timeout value for a specific channel. More... | |
| int32_t | bissc_config_periodic_trigger_cap_mode (bissc_handle handle) |
| Configure periodic trigger CAP mode. More... | |
| int32_t | bissc_config_iep_cap_event (bissc_handle handle, uint8_t channel, uint8_t event_num) |
| Configure IEP CAP event for periodic trigger (DMEM configuration only) More... | |
| int32_t | bissc_config_iep_cmp_event (bissc_handle handle, uint8_t channel, uint8_t event_num) |
| Configure IEP CMP event for periodic trigger (DMEM configuration only) More... | |
| void bissc_params_init | ( | bissc_params * | params | ) |
Initialize the parameters data structure with defaults.
This function copies default BiSS-C parameters from gBisscDefaultParams to the provided params structure.
| [out] | params | Initialized parameters |
| bissc_handle bissc_init | ( | uint32_t | index, |
| const bissc_params * | bissc_params | ||
| ) |
Initialize a BiSS-C instance.
This function initializes a BiSS-C instance by setting up the firmware interface and configuring hardware based on SysConfig parameters.
This function internally calls the following APIs:
| [in] | index | Index of BiSS-C handle to use in the gBisscHandle array |
| [in] | bissc_params | Pointer to structure containing BiSS-C parameters |
| handle | Pointer to initialized bissc_handle instance |
| NULL | On validation failure (invalid index, NULL params, NULL priv/attrs, invalid pruicss_handle, failed hardware initialization) |
| void bissc_deinit | ( | bissc_handle | handle | ) |
De-initialize a BiSS-C instance.
This function de-initializes the BiSS-C instance by marking the handle as closed (is_open = 0). It does not free memory or disable PRU cores.
| [in] | handle | BiSS-C handle |
| int32_t bissc_command_process | ( | bissc_handle | handle | ) |
Send the BiSS-C command and wait till firmware acknowledges.
This function processes a BiSS-C command transaction. The behavior differs based on the operating mode:
Host Trigger Mode:
Periodic Trigger Mode (CMP or CAP):
In periodic modes, the PRU firmware automatically initiates BiSS-C transactions based on IEP timer events, so explicit command sending by the host is not required.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | On successful completion |
| SystemP_TIMEOUT | On timeout waiting for firmware acknowledgment (propagated from bissc_command_wait) |
| SystemP_FAILURE | On validation failure (NULL handle or invalid internal structures) |
| int32_t bissc_command_send | ( | bissc_handle | handle | ) |
Trigger sending the BiSS-C command in PRU.
This function sets the cycle_trigger flag(s) in the PRU-ICSS exchange structure to initiate a BiSS-C transaction. In load share mode, it sets individual trigger flags for each enabled channel. In non-load share mode, it sets a single trigger flag.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_command_wait | ( | bissc_handle | handle | ) |
Wait till PRU finishes BiSS-C transaction.
This function polls the cycle_trigger flag(s) in PRU-ICSS exchange structure to detect when the PRU firmware has completed the BiSS-C transaction. It adds a delay between poll iterations to prevent excessive CPU usage, and implements a timeout mechanism.
This function internally calls:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | On successful completion |
| SystemP_TIMEOUT | On timeout (configured via bissc_params.max_wait_loop_count before calling bissc_init, default: 5ms) |
| SystemP_FAILURE | On validation failure (NULL handle or invalid internal structures) |
| int32_t bissc_get_pos | ( | bissc_handle | handle | ) |
Get single cycle BiSS-C position data.
This function internally calls the following APIs:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | On successful position data retrieval |
| SystemP_TIMEOUT | On timeout waiting for firmware acknowledgment (propagated from bissc_command_process) |
| SystemP_FAILURE | On validation failure (NULL handle or invalid internal structures) |
| int32_t bissc_config_clock | ( | bissc_handle | handle, |
| bissc_clk_cfg * | clk_cfg | ||
| ) |
Configure BiSS-C clock configuration into PRU-ICSS register, enable load share (if needed), and indicate firmware to measure the delay again.
This function configures the PRU-ICSS clock registers based on the provided clock configuration structure. After clock configuration, it conditionally calls:
| [in] | handle | BiSS-C handle |
| [in] | clk_cfg | pointer to structure containing clock configuration data |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation or hardware access failure |
| int32_t bissc_config_channel | ( | bissc_handle | handle, |
| uint8_t | mask, | ||
| uint8_t | total_channels | ||
| ) |
Select channel to be used by BiSS-C receiver.
This function configures the channel mask in PRU firmware and builds an internal channel array mapping enabled channels to their indices. For example, if channels 0 and 2 are enabled, priv->channel[] will be {0, 2}. This mapping is used throughout the driver for channel operations.
| [in] | handle | BiSS-C handle |
| [in] | mask | channel mask (bit 0=CH0, bit 1=CH1, bit 2=CH2) |
| [in] | total_channels | total number of channels in use |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_wait_for_fw_initialization | ( | bissc_handle | handle, |
| uint32_t | loop_count | ||
| ) |
Wait for BiSS-C receiver firmware to initialize.
This function polls the firmware initialization status flags in the PRU-ICSS exchange structure to detect when PRU firmware has completed initialization. It checks the status flags based on the channel mask to ensure all enabled channels are initialized.
In load share mode: Checks status for all channels specified in channel_mask (1-7). In non-load share mode: Checks only status[0] regardless of channel configuration.
The function returns immediately when initialization is detected, or after loop_count iterations if initialization does not complete (timeout).
Timeout calculation: Total timeout will be approximately loop_count × fw_wait_delay_us microseconds Example: loop_count=5000 with default fw_wait_delay_us=1000µs gives 5 seconds
This function internally calls:
| [in] | handle | BiSS-C handle |
| [in] | loop_count | Maximum number of polling iterations before timeout |
| SystemP_SUCCESS | When all specified channels are initialized |
| SystemP_TIMEOUT | On timeout (loop_count iterations exhausted before initialization completed) |
| SystemP_FAILURE | On validation failure (NULL handle, invalid internal structures, or invalid channel_mask in load share mode) |
| int32_t bissc_hw_init | ( | bissc_handle | handle | ) |
Initialize BiSS-C hardware interface.
This function internally calls the following APIs:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation or hardware initialization failure |
| int32_t bissc_update_max_proc_delay | ( | bissc_handle | handle | ) |
Update maximum processing delay value.
This function sets the maximum encoder processing delay value in the PRU-ICSS exchange structure based on the configured baud rate.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_wait_measure_proc_delay | ( | bissc_handle | handle, |
| uint32_t | loop_count | ||
| ) |
Wait for BiSS-C receiver firmware to measure processing time.
This function polls the measure_proc_delay flag in PRU-ICSS exchange structure to detect when firmware has completed encoder processing delay measurement.
This function internally calls:
| [in] | handle | BiSS-C handle |
| [in] | loop_count | Maximum number of polling iterations before timeout |
| SystemP_SUCCESS | When measurement completes successfully |
| SystemP_TIMEOUT | On timeout (loop_count iterations exhausted before measurement completed) |
| SystemP_FAILURE | On validation failure (NULL handle or invalid internal structures) |
| int32_t bissc_set_default_initialization | ( | bissc_handle | handle | ) |
Set default configuration parameters for BiSS-C receiver firmware.
This function internally calls the following APIs:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_update_data_len | ( | bissc_handle | handle, |
| uint32_t | single_turn_len[], | ||
| uint32_t | multi_turn_len[], | ||
| uint32_t | ch_num | ||
| ) |
Update data length with encoder bit width for BiSS-C receiver firmware.
This function configures encoder resolution parameters for a specific channel. It updates the PRU firmware with single-turn and multi-turn bit lengths for each encoder in the daisy chain, calculates total data length including CRC bits, and stores these values in both the private structure and PRU-ICSS exchange memory for firmware access.
Validation Strategy: This function uses a two-phase approach to ensure atomic configuration:
This ensures that if any encoder configuration is invalid, the driver remains in its previous valid state rather than being left partially configured.
Frame Size Constraints: This function validates that the total frame size does not exceed 64 bits:
| [in] | handle | BiSS-C handle |
| [in] | single_turn_len | Encoder's single turn resolution array |
| [in] | multi_turn_len | Encoder's multi turn resolution array |
| [in] | ch_num | channel number(index) in use |
| SystemP_SUCCESS | on success |
| SystemP_FAILURE | on validation failure (NULL parameters, invalid ch_num, or frame size exceeds 64 bits) |
| int32_t bissc_set_ctrl_cmd_and_process | ( | bissc_handle | handle, |
| uint32_t | ctrl_cmd[] | ||
| ) |
Set control command and process the ctrl communication read/write.
This function sends control commands to the encoder and polls for completion. It sets the ctrl_cmd and ctrl_cmd_status fields in PRU-ICSS exchange structure, then polls until firmware completes the control communication transaction. A delay configured via bissc_params.fw_wait_delay_us (before calling bissc_init) (default: 1000 microseconds) is used between poll iterations and after control communication stop bits to ensure proper timing for encoder control communication protocol compliance. After completion, it reads back the control data from the encoder response.
This function internally calls the following APIs:
| [in] | handle | BiSS-C handle |
| [in] | ctrl_cmd | Hex equivalent of control command array (per channel) |
| SystemP_SUCCESS | On successful control communication completion |
| SystemP_TIMEOUT | On timeout waiting for firmware acknowledgment (propagated from bissc_command_process) |
| SystemP_FAILURE | On validation failure (NULL handle, NULL ctrl_cmd array, or invalid internal structures) |
| int32_t bissc_get_enc_proc_delay | ( | bissc_handle | handle | ) |
Get measured processing delay of individual channel.
This function copies the encoder processing delay values measured by the PRU firmware from the PRU-ICSS exchange structure to the driver's private structure.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_calc_clock | ( | bissc_handle | handle, |
| bissc_clk_cfg * | clk_cfg | ||
| ) |
Calculate Rx and Tx divisors for given frequency.
This function calculates the Tx and Rx clock divisors required to achieve the configured baud rate from either core clock or UART clock source. It also sets the FIFO bit index for oversampling and determines valid baud rates based on the clock source and divisor limits. Returns error if the requested frequency cannot be achieved with available clock sources.
| [in] | handle | BiSS-C handle |
| [out] | clk_cfg | pointer to structure to store calculated clock configuration |
| SystemP_SUCCESS | on success, SystemP_FAILURE on failure |
| int32_t bissc_config_periodic_trigger_cmp_mode | ( | bissc_handle | handle | ) |
Configure periodic trigger operation mode using IEP compare event.
Configures the BiSS-C firmware to use IEP CMP (compare) events for periodic triggering. Position data is sampled automatically when IEP counter reaches the configured CMP event compare value.
Configuration requirements:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_config_host_trigger | ( | bissc_handle | handle | ) |
Configure host trigger operation mode.
This function sets the operation mode to BISSC_OPMODE_HOST_TRIGGER in the PRU-ICSS exchange structure. In this mode, position data is retrieved only when explicitly triggered by the host via bissc_command_send.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| uint32_t bissc_generate_ctrl_cmd | ( | bissc_handle | handle, |
| uint8_t | ls_ch, | ||
| uint8_t | ctrl_write_status, | ||
| uint32_t | ctrl_reg_address, | ||
| uint32_t | ctrl_reg_data, | ||
| uint32_t | ctrl_enc_id | ||
| ) |
Generate control communication Hex equivalent command.
This function generates a control communication command according to BiSS-C protocol.
This function internally calls the following APIs:
- bissc_calc_ctrl_crc (internal) : Calculate 4-bit CRC values for command and data portions
| [in] | handle | BiSS-C handle |
| [in] | ls_ch | channel in use for load share |
| [in] | ctrl_write_status | status for control communication write access
|
| [in] | ctrl_reg_address | address of encoder's register for control communication access (7-bit: 0x00-0x7F) |
| [in] | ctrl_reg_data | data to write in encoder's register in control communication (8-bit: 0x00-0xFF) |
| [in] | ctrl_enc_id | ID of encoder based on it's place in daisy chain (3-bit: 0x0-0x7) |
| ctrl_cmd | Hex equivalent control communication 32 bit command |
| 0 | On NULL handle, invalid ls_ch (>= BISSC_NUM_CH_PER_SLICE_MAX), invalid ctrl_write_status (> 1), invalid ctrl_reg_address (> BISSC_REG_ADDR_MASK), invalid ctrl_reg_data (> BISSC_REG_DATA_MASK), or invalid ctrl_enc_id (> BISSC_ENC_ID_MASK) |
| uint32_t bissc_get_current_channel | ( | bissc_handle | handle, |
| uint32_t | ch_idx | ||
| ) |
Retrieves the current channel in use.
This function returns the physical channel number at the specified index in the internal channel array. For example, if channels 0 and 2 are enabled, ch_idx=0 returns 0, ch_idx=1 returns 2.
| [in] | handle | BiSS-C handle |
| [in] | ch_idx | index into the channel array |
| channel[ch_idx] | physical channel number (0, 1, or 2) |
| 0 | On NULL handle or invalid ch_idx (>= BISSC_NUM_CH_PER_SLICE_MAX) |
| uint32_t bissc_get_total_channels | ( | bissc_handle | handle | ) |
Retrieves total number of channels configured.
This function returns the total number of enabled channels from the attrs structure.
| [in] | handle | BiSS-C handle |
| total_channels | total number of channels configured (1-3) |
| 0 | On NULL handle or NULL attrs |
| int32_t bissc_clear_data_len | ( | bissc_handle | handle | ) |
Clears all the encoder resolution parameters.
This function resets all encoder resolution data to zero in the private structure, including num_encoders, single_turn_len, multi_turn_len, and data_len arrays for all channels. This is typically called before reconfiguring encoder parameters.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_update_clock_freq | ( | bissc_handle | handle, |
| uint32_t | frequency | ||
| ) |
Update the operating baud rate as specified by the user.
This function updates the baud_rate field in the private structure with the specified frequency value. This value is used later by bissc_calc_clock() to calculate appropriate clock divisors.
| [in] | handle | BiSS-C handle |
| [in] | frequency | Frequency in MHz (valid values: 1, 2, 5, 8, 10) |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation or invalid frequency |
| int32_t bissc_clock_config | ( | bissc_handle | handle, |
| uint32_t | frequency, | ||
| uint32_t | loop_count | ||
| ) |
Configure BiSS-C clock frequency.
This function updates the clock frequency, recalculates clock divisors, reinitializes the hardware with new clock settings, and waits for the firmware to complete encoder processing delay measurement.
This function internally calls the following APIs:
| [in] | handle | BiSS-C handle |
| [in] | frequency | Desired clock frequency in MHz (valid values: 1/2/5/8/10) |
| [in] | loop_count | loop_count used when calling bissc_wait_measure_proc_delay |
| SystemP_SUCCESS | On successful clock configuration and delay measurement |
| SystemP_TIMEOUT | On timeout during delay measurement (propagated from bissc_wait_measure_proc_delay) |
| SystemP_FAILURE | On validation failure (NULL handle, invalid frequency, or clock calculation failure) |
| int32_t bissc_enable_safety | ( | bissc_handle | handle, |
| uint32_t | enc_num, | ||
| uint32_t | ch_num | ||
| ) |
Enable Safety for connected BiSS-C encoder.
This function enables safety mode for a specific encoder on a specific channel. It sets the has_safety flag in both the private structure and the PRU-ICSS exchange structure. When safety is enabled, the encoder provides additional CRC and error checking per the BiSS-C safety specification.
| [in] | handle | BiSS-C handle |
| [in] | enc_num | encoder number(index) in daisy chain |
| [in] | ch_num | channel number(index) |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_disable_safety | ( | bissc_handle | handle | ) |
Disable Safety for connected BiSS-C encoder.
This function disables safety mode for all encoders on all channels by clearing the has_safety flags in both the private structure and the PRU-ICSS exchange structure.
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| const bissc_attrs* bissc_get_attrs | ( | bissc_handle | handle | ) |
Get pointer to BiSS-C attributes structure.
This function provides access to the read-only attributes structure containing configuration parameters set during initialization, such as PRU-ICSS instance, channel configuration, load share settings, and clock configuration. Returns NULL if handle is invalid.
| [in] | handle | BiSS-C handle |
| attrs | Pointer to const bissc_attrs structure, NULL if handle is invalid |
| bissc_priv* bissc_get_priv | ( | bissc_handle | handle | ) |
Get pointer to BiSS-C private data structure.
This function provides access to the private data structure containing runtime state information, encoder parameters, processing delays, and pointers to PRU-ICSS resources. This function should be used with caution. Returns NULL if handle is invalid.
| [in] | handle | BiSS-C handle |
| priv | Pointer to bissc_priv structure, NULL if handle is invalid |
| int32_t bissc_set_encoder_timeout | ( | bissc_handle | handle, |
| uint32_t | ch_num, | ||
| uint32_t | encoder_timeout | ||
| ) |
Set encoder timeout value for a specific channel.
This function allows setting the encoder timeout value in PRU cycles for a specific channel. This parameter decides how long the clock signal is stretched according to polarity of CDM bit during control communication.
| [in] | handle | BiSS-C handle |
| [in] | ch_num | Channel number (0-2 for ch0, ch1, ch2). Used in load share mode, ignored in single PRU mode (always uses index 0). |
| [in] | encoder_timeout | Timeout value in PRU cycles |
| SystemP_SUCCESS | On success |
| SystemP_FAILURE | On validation failure (NULL handle or invalid ch_num) |
| uint32_t bissc_get_encoder_timeout | ( | bissc_handle | handle, |
| uint32_t | ch_num | ||
| ) |
Get encoder timeout value for a specific channel.
This function retrieves the current encoder timeout value in PRU cycles for a specific channel. This parameter decides how long the clock signal is stretched according to polarity of CDM bit during control communication.
| [in] | handle | BiSS-C handle |
| [in] | ch_num | Channel number (0-2 for ch0, ch1, ch2). Used in load share mode, ignored in single PRU mode (always uses index 0). |
| encoder_timeout | Current timeout value in PRU cycles |
| 0 | On validation failure (NULL handle or invalid ch_num) |
| int32_t bissc_config_periodic_trigger_cap_mode | ( | bissc_handle | handle | ) |
Configure periodic trigger CAP mode.
Configures the BiSS-C firmware to use IEP CAP (capture) events for periodic triggering. Position data is sampled automatically when an external signal triggers the IEP capture event.
Configuration requirements:
| [in] | handle | BiSS-C handle |
| SystemP_SUCCESS | on success, SystemP_FAILURE on validation failure |
| int32_t bissc_config_iep_cap_event | ( | bissc_handle | handle, |
| uint8_t | channel, | ||
| uint8_t | event_num | ||
| ) |
Configure IEP CAP event for periodic trigger (DMEM configuration only)
This function configures the IEP capture event information in PRU shared memory (DMEM) for firmware access. It writes the capture register address and event number to trigger_params structure. This function does NOT configure IEP hardware registers.
| [in] | handle | BiSS-C handle |
| [in] | channel | Channel number (0-2 for ch0, ch1, ch2). Used in load share mode, ignored in single PRU mode (always uses index 0). |
| [in] | event_num | IEP CAP event number (valid range: 0-7) |
| SystemP_SUCCESS | on success, SystemP_FAILURE otherwise |
| int32_t bissc_config_iep_cmp_event | ( | bissc_handle | handle, |
| uint8_t | channel, | ||
| uint8_t | event_num | ||
| ) |
Configure IEP CMP event for periodic trigger (DMEM configuration only)
This function configures the IEP compare event information in PRU shared memory (DMEM) for firmware access. It writes the event number to trigger_params structure. This function does NOT configure IEP hardware registers.
| [in] | handle | BiSS-C handle |
| [in] | channel | Channel number (0-2 for ch0, ch1, ch2). Used in load share mode, ignored in single PRU mode (always uses index 0). |
| [in] | event_num | IEP CMP event number (valid range: 0-15) |
| SystemP_SUCCESS | on success, SystemP_FAILURE otherwise |