AM263Px Motor Control SDK  2025.00.00
bissc_priv Struct Reference

Detailed Description

BiSS-C private data structure (runtime state and configuration)

Contains runtime state information including encoder parameters, position/control data results, CRC error counts, safety data, and pointers to PRU-ICSS shared memory (bissc_pruicss_xchg). This structure is initialized during bissc_init and should be accessed via bissc_get_priv API.

Data Fields

uint8_t is_open
 
uint32_t data_len [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint32_t single_turn_len [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint32_t multi_turn_len [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint32_t channel [BISSC_NUM_CH_PER_SLICE_MAX]
 
bissc_pruicss_xchgpruicss_xchg
 
uint8_t has_safety [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint8_t sign_of_life_cnt [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint16_t rcv_safety_crc [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint16_t calc_safety_crc [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint8_t is_continuous_mode
 
uint64_t raw_data
 
bissc_position_info enc_pos_data [BISSC_NUM_CH_PER_SLICE_MAX]
 
bissc_control_info enc_ctrl_data [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t pd_crc_err_cnt [BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]
 
uint32_t ctrl_crc_err_cnt [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t num_encoders [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint8_t ctrl_write_status [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t ctrl_reg_address [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t ctrl_reg_data [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t ctrl_enc_id [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint16_t proc_delay [BISSC_NUM_CH_PER_SLICE_MAX]
 
uint32_t baud_rate
 
uint32_t cmd_process_delay_us
 
uint32_t fw_wait_delay_us
 
uint32_t max_wait_loop_count
 
PRUICSS_Handle pruicss_handle
 

Field Documentation

◆ is_open

uint8_t bissc_priv::is_open

Initialization state flag. 0 = Driver closed/not initialized 1 = Driver successfully initialized and open

◆ data_len

Total resolution (single-turn + multi-turn) in bits for each encoder. Indexed by [channel][encoder_in_daisy_chain]

◆ single_turn_len

uint32_t bissc_priv::single_turn_len[BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]

Single-turn resolution in bits for each encoder. Indexed by [channel][encoder_in_daisy_chain]

◆ multi_turn_len

Multi-turn resolution in bits for each encoder. Indexed by [channel][encoder_in_daisy_chain]

◆ channel

uint32_t bissc_priv::channel[BISSC_NUM_CH_PER_SLICE_MAX]

Array mapping enabled channel indices to physical channel numbers (0, 1, or 2). Example: If only ch1 is enabled, channel[0] = 1 Example: If ch0 and ch2 are enabled, channel[0] = 0 and channel[1] = 2

◆ pruicss_xchg

bissc_pruicss_xchg* bissc_priv::pruicss_xchg

Pointer to PRU-ICSS shared memory interface structure. This is the primary communication structure between ARM R5F and PRU firmware

◆ has_safety

BiSS Safety protocol enable flag for each encoder. 0 = Standard BiSS-C only 1 = BiSS Safety enabled (includes 16-bit CRC and sign-of-life counter)

◆ sign_of_life_cnt

uint8_t bissc_priv::sign_of_life_cnt[BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]

6-bit sign-of-life counter from BiSS Safety protocol. Increments with each transaction to detect communication interruptions

◆ rcv_safety_crc

Received 16-bit safety CRC from encoder (BiSS Safety protocol)

◆ calc_safety_crc

uint16_t bissc_priv::calc_safety_crc[BISSC_NUM_CH_PER_SLICE_MAX][BISSC_NUM_ENCODERS_IN_DAISY_CHAIN_MAX]

Calculated 16-bit safety CRC by PRU firmware for comparison. Mismatch indicates data corruption

◆ is_continuous_mode

uint8_t bissc_priv::is_continuous_mode

Operation mode flag. 0 = Host trigger mode (manual transaction triggering) 1 = Periodic/continuous mode (IEP timer-driven automatic triggering)

◆ raw_data

uint64_t bissc_priv::raw_data

Data storage for raw 64-bit data received from encoder. Used during position data parsing in bissc_get_pos

◆ enc_pos_data

Parsed position data results (angle, turns, CRC) for each channel. Updated by bissc_get_pos after each successful transaction

◆ enc_ctrl_data

bissc_control_info bissc_priv::enc_ctrl_data[BISSC_NUM_CH_PER_SLICE_MAX]

Control communication results (register data, CRC) for each channel. Updated by bissc_set_ctrl_cmd_and_process after register read/write

◆ pd_crc_err_cnt

Cumulative position data CRC error count for each encoder. Incremented by firmware when received CRC != calculated CRC

◆ ctrl_crc_err_cnt

uint32_t bissc_priv::ctrl_crc_err_cnt[BISSC_NUM_CH_PER_SLICE_MAX]

Cumulative control communication CRC error count for each channel. Incremented when control response CRC validation fails

◆ num_encoders

uint32_t bissc_priv::num_encoders[BISSC_NUM_CH_PER_SLICE_MAX]

Number of encoders connected in daisy chain on each channel. Configured via bissc_update_data_len()

◆ ctrl_write_status

uint8_t bissc_priv::ctrl_write_status[BISSC_NUM_CH_PER_SLICE_MAX]

Control communication read/write status for each channel. Valid values: 0 (Read access) or 1 (Write access)

◆ ctrl_reg_address

uint32_t bissc_priv::ctrl_reg_address[BISSC_NUM_CH_PER_SLICE_MAX]

Target register address for control communication (0x00-0x7F). Set by bissc_generate_ctrl_cmd()

◆ ctrl_reg_data

uint32_t bissc_priv::ctrl_reg_data[BISSC_NUM_CH_PER_SLICE_MAX]

Register data for control communication

◆ ctrl_enc_id

uint32_t bissc_priv::ctrl_enc_id[BISSC_NUM_CH_PER_SLICE_MAX]

Encoder ID for control communication in daisy chain

◆ proc_delay

uint16_t bissc_priv::proc_delay[BISSC_NUM_CH_PER_SLICE_MAX]

Measured encoder processing delay in clock cycles for each channel. Automatically measured by PRU firmware during initialization

◆ baud_rate

uint32_t bissc_priv::baud_rate

BiSS-C communication baud rate in MHz (1, 2, 5, 8, or 10). Configured via bissc_update_clock_freq() or from SysConfig. Copied from attrs in bissc_init. Runtime modification is possible.

◆ cmd_process_delay_us

uint32_t bissc_priv::cmd_process_delay_us

Delay in microseconds for command processing polling loop. Used in bissc_command_wait. Copied from params in bissc_init.

◆ fw_wait_delay_us

uint32_t bissc_priv::fw_wait_delay_us

Delay in microseconds between firmware status checks. Used in firmware initialization and control communication functions. Copied from params in bissc_init.

◆ max_wait_loop_count

uint32_t bissc_priv::max_wait_loop_count

Maximum wait loop count for BiSS-C cycle timeout detection. Actual timeout (ms) = max_wait_loop_count * cmd_process_delay_us / 1000 Used in bissc_command_wait. Must be greater than 0. Copied from params in bissc_init.

◆ pruicss_handle

PRUICSS_Handle bissc_priv::pruicss_handle

PRU-ICSS driver handle obtained from PRUICSS_open(). Used for accessing PRU-ICSS hardware resources. Copied from params in bissc_init.