Common Issues in Host MCU Development.
Dynamic Parameter Configuration
The HOST_DRIVER maintains a parameter configuration structure that maps directly to the parameter types available in the GUI tool. Developers can achieve dynamic parameter configuration at runtime by modifying the members of this structure.
Assuming you need to modify the Detection Sensitivity parameter, follow these specific steps:
Step1: Import Base Configuration: Import your custom parameter configuration file (the baseline) into the GUI tool.
Step2: Generate New Configuration: Modify the detection sensitivity parameter within the GUI and generate a new configuration file.
Note: Save this as a new file; do not overwrite the baseline configuration from Step 1.
Step3: Identify TLV Differences: Compare the configuration files from Step 1 and Step 2 to isolate the exact changes. Identify the changed parameter type (referred to as TLV - Type, Length, Value) and record its new value.
Step4: Locate Target Variables in Code: Open the sensor_driver.c file within the HOST_DRIVER package. Check the macro definitions at the top of the file to confirm:
• The specific macro corresponding to the changed TLV.
• The structure member mapped to this TLV within the sensor_param_config API.
• The specific configuration section/block where this TLV resides.
Step5: Update the Structure: Call the sensor_cfg_get API to retrieve the current configuration structure. Access the relevant section and modify the member variable (identified in Step 4) with your recorded new value.
Step6: Dispatch the Configuration: Call the sensor_pram_cfg_startup API to dispatch and apply the updated confiuration to the sensor.
Technical Documentation
| Name | Related |
|---|---|
|
|
|




