98typedef enum : int16_t {
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_tsn_convert_to_milli_c(uint16_t raw_code, int32_t *out_milli_c)
Convert a raw 12-bit TSN code to milli-degrees-Celsius.
ra8_err_t ra8_tsn_init(const ra8_tsn_config_t *cfg)
Power on the TSN block and enable its ADC output path.
ra8_tsn_cal_temp_t
Factory calibration reference temperatures (degC).
@ k_ra8_tsn_cal_temp_high_125
125 degC Tj_max parts.
@ k_ra8_tsn_cal_temp_low_n40
Always -40 degC on RA8D2.
@ k_ra8_tsn_cal_temp_high_105
95 / 105 degC parts.
ra8_err_t ra8_tsn_exit_stop(void)
Clear MSTPD22 to re-power the TSN block.
ra8_err_t ra8_tsn_get_status(uint8_t *out_tscr)
Read TSCR (TSEN + TSOE bits).
ra8_err_t ra8_tsn_read_die_temp_milli_c(int32_t *out_milli_c)
Read the die temperature end-to-end through the HAL.
ra8_err_t ra8_tsn_clear_status(void)
Clear TSCR (drive both TSEN and TSOE low).
ra8_err_t ra8_tsn_read_raw(uint16_t raw, uint16_t *out_code)
Pass through a raw ADC sample of the TSN channel.
ra8_err_t ra8_tsn_enter_stop(void)
Re-assert MSTPD22 to clock-gate the TSN block.
ra8_err_t ra8_tsn_deinit(void)
Tear down the TSN block.
Temperature Sensor (TSN) register layout for the Renesas RA8D2.
Configuration descriptor for ra8_tsn_init.
uint16_t stab_us
tTSTBL in microseconds.
ra8_tsn_cal_temp_t low_ref_degc
Always -40 degC on RA8D2.
ra8_tsn_cal_temp_t high_ref_degc
105 or 125 degC.