SLVAFT2A May   2024  – July 2024 TPS2HCS10-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Software Ecosystem
  5. 2Platform Drivers
    1. 2.1 Driver Concept
    2. 2.2 Supported Platforms
    3. 2.3 Porting to Other Platforms
    4. 2.4 API Guide
      1. 2.4.1  tHCSResponseCode Union Reference
      2. 2.4.2  float_t HCS_convertCurrent (uint16_t rawValue, uint16_t ksnsVal, uint16_t snsRes)
      3. 2.4.3  float_t HCS_convertTemperature (uint16_t rawValue)
      4. 2.4.4  float_t HCS_convertVoltage (uint16_t rawValue)
      5. 2.4.5  tHCSResponseCode HCS_getChannelFaultStatus (uint8_t chanNum, uint16_t * fltStatus)
      6. 2.4.6  tHCSResponseCode HCS_getDeviceFaultSatus (uint16_t * fltStatus)
      7. 2.4.7  tHCSResponseCode HCS_gotoLPM (lpm_exit_curr_ch1_t ch1ExitCurrent, lpm_exit_curr_ch2_t ch2ExitCurrent)
      8. 2.4.8  tHCSResponseCode HCS_gotoSleep (void )
      9. 2.4.9  tHCSResponseCode HCS_initializeDevice (TPS2HCS10Q1_CONFIG * config)
      10. 2.4.10 tHCSResponseCode HCS_readRegister (uint8_t addr, uint16_t * readValue)
      11. 2.4.11 tHCSResponseCode HCS_setSwitchState (uint8_t swState)
      12. 2.4.12 tHCSResponseCode HCS_updateConfig (TPS2HCS10Q1_CONFIG * config)
      13. 2.4.13 tHCSResponseCode HCS_wakeupDevice (void )
      14. 2.4.14 tHCSResponseCode HCS_writeRegister (uint8_t addr, uint16_t payload)
  6. 3Configuration or Evaluation Tool
  7. 4Code Examples
    1. 4.1 Empty Example
    2. 4.2 I2T Trip Example
    3. 4.3 Low-Power Mode Example
    4. 4.4 Current Sense Example
  8. 5Summary
  9. 6References
  10. 7Revision History

Configuration or Evaluation Tool

The Smart Fuse Configurator tool is a software host tool that can be used along side of the HSS-HCMOTHERBRDEVM to live configure an HCS high-side switch as well as read out diagnostics such as current sense and fault conditions. Additionally, starting from version 1.9.4 the software has the ability to enter configuration mode without the need for a physical EVM board. In configuration mode, the user is able to change all different aspects of the device's settings such as current limit, capacitive charging modes, diagnostic reporting, and so on. The use can also use the I2T tuner to configure the device to match the wire profile and capabilities of the melting fuse being replaced. To enter configuration mode, select Help->Demo/Config Mode as shown in Figure 3-1:

 Configuration Mode Figure 3-1 Configuration Mode

Once in demo mode, the user can use the software as described in the Smart Fuse Evaluation Module user's guide. Note that actual communication with the EVM are not performed in this mode and any diagnostics reported on the GUI are also not reflected. Demo mode can be exited by either selecting Help->Demo/Config Mode or by plugging in an EVM to the device.

Once the device has been configured to meet the application needs, the configuration can be exported by selecting Export->Configuration Files:

 Export Configuration Figure 3-2 Export Configuration

The files that are exported from this dialog are the same configuration files that come packaged with the provided code examples (default titled tps2hcs10_config.h and tps2hcs10_config.c). As an easy point-of-entry, the configuration files can be exported to the Empty Example (Section 4.1) and override the defaults file for a blank program used to start smart fuse development.

Note that the exported configuration files depend on the device specific header file that is provided on the project page. This header file contains all off the register definitions and enumerations relevant to the specific high-side switch part number.

The exported files contains a register definition that corresponds to every relevant configuration register of the device:

typedef struct TPS2HCS10Q1_CONFIG
{
    TPS2HC10S_CRC_CONFIG_OBJ        crcConfig;
    TPS2HC10S_LPM_OBJ               lpmConfig;
    TPS2HC10S_FAULT_MASK_OBJ        faultMaskConfig;
    TPS2HC10S_SW_STATE_OBJ          swState;
    TPS2HC10S_DEVICE_SAF_OBJ        devSAFConfig;
    TPS2HC10S_DEV_CONFIG_OBJ        devConfig;
    TPS2HC10S_ADC_CONFIG_OBJ        adcConfig;
    TPS2HC10S_PWM_CH1_OBJ           pwmCh1Config;
    TPS2HC10S_ILIM_CONFIG_CH1_OBJ   ilimCh1Config;
    TPS2HC10S_DIAG_CONFIG_CH1_OBJ   diagConfigCh1;
    TPS2HC10S_I2T_CONFIG_CH1_OBJ    i2tConfigCh1;
    TPS2HC10S_PWM_CH2_OBJ           pwmCh2Config;
    TPS2HC10S_ILIM_CONFIG_CH2_OBJ   ilimCh2Config;
    TPS2HC10S_DIAG_CONFIG_CH2_OBJ   diagConfigCh2;
    TPS2HC10S_I2T_CONFIG_CH2_OBJ    i2tConfigCh2;
 } TPS2HCS10Q1_CONFIG;

A pointer to this function is passed into the HCS_initializeDevice function of the platform driver (typically at microcontroller boot-up) to initially configure the high-side switch. After the structure definition, an instantiation of the structure is declared with values that represent all of the configured value from the Smart Fuse Configurator tool. The user can user this instantiation as a starting point and update manually through the code if a change is required, or regenerate the configuration file from the Smart Fuse Configurator program.