Skip to content

Commit

Permalink
wiseconnect: Disable high temperature security
Browse files Browse the repository at this point in the history
Wiseconnect allows to use an alternative clock if the temperature during
the start up is too high. However:
  - this feature relies on ADC and we don't want to import it for now
  - this kind of magic feature should be exposed to the user rather than
    hidden in the HAL (especially since use can also use ADC hardware)

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
  • Loading branch information
jerome-pouiller authored and jhedberg committed Feb 7, 2025
1 parent e1f2f90 commit 3faf6de
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@
#include "rsi_ipmu.h"
#include "rsi_pll.h"
#include "rsi_ulpss_clk.h"
#include "sl_si91x_bjt_temperature_sensor.h"

/**
* Defines
*/
#define SYSTEM_CLK_VAL_20MHZ ((uint32_t)(20000000)) // macro for 20MHz
#define SYSTEM_CLK_VAL_MHZ ((uint32_t)(32000000)) // macro for 32MHz doubler

extern adc_config_t sl_bjt_config;
extern adc_ch_config_t sl_bjt_channel_config;

/**
* @fn void RSI_IPMU_UpdateIpmuCalibData_efuse(const efuse_ipmu_t *ipmu_calib_data)
* @brief This function prepares the data from the ipmu calib structure content and writes to each specific register
Expand Down Expand Up @@ -463,14 +459,8 @@ void RSI_Configure_Ipmu_Mode(void)
/*configures chip supply mode to HP-LDO */
configure_ipmu_mode(HP_LDO_MODE);
#else
/* Read the temperature; if it is within the range of 0 to 60 degrees, switch the chip supply to SCDC mode. Otherwise, maintain the default LDO supply mode.*/
sl_si91x_bjt_temperature_sensor_init(sl_bjt_channel_config, sl_bjt_config);
sl_si91x_bjt_temperature_sensor_read_data(&temperature);
sl_si91x_bjt_temperature_sensor_deinit(sl_bjt_config);
if ((temperature > 0) && (temperature <= 60)) {
/*configures chip supply mode to SCDC */
configure_ipmu_mode(SCDC_MODE);
}
(void)temperature;
configure_ipmu_mode(SCDC_MODE);
#endif
}
void update_efuse_system_configs(int data, uint32_t config_ptr[])
Expand Down

0 comments on commit 3faf6de

Please # to comment.