Go to the source code of this file.
|
| uint8_t | TCMDEXEC_obc_read_temperature_complex (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| | Reads the temperature from the STDS75DS2F and stores it in the provided variable temperature. Temperature range is -55 to 125 degrees celsius with +/- 3 degrees celsius accuracy over the whole range.
|
| uint8_t | TCMDEXEC_obc_read_temperature (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| | Reads the temperature from the STDS75DS2F in centi-Celsius.
|
| uint8_t | TCMDEXEC_obc_adc_read_vbat_voltage (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| | Read the battery voltage using the ADC. Returns the result in mV. Voltage divider ratio is already applied.
|
| uint8_t | TCMDEXEC_obc_set_stm32_sysclk_to_hse (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len) |
| | Change the STM32 SYSCLK clock from the HSI to the HSE.
|
◆ TCMDEXEC_obc_adc_read_vbat_voltage()
| uint8_t TCMDEXEC_obc_adc_read_vbat_voltage |
( |
const char * | args_str, |
|
|
char * | response_output_buf, |
|
|
uint16_t | response_output_buf_len ) |
Read the battery voltage using the ADC. Returns the result in mV. Voltage divider ratio is already applied.
- Parameters
-
- Returns
◆ TCMDEXEC_obc_read_temperature()
| uint8_t TCMDEXEC_obc_read_temperature |
( |
const char * | args_str, |
|
|
char * | response_output_buf, |
|
|
uint16_t | response_output_buf_len ) |
Reads the temperature from the STDS75DS2F in centi-Celsius.
- Returns
- 0 if successful, >0 if error.
- Note
- Temperature range is -55 to 125 degrees celsius with +/- 3 degrees celsius accuracy over the whole range.
◆ TCMDEXEC_obc_read_temperature_complex()
| uint8_t TCMDEXEC_obc_read_temperature_complex |
( |
const char * | args_str, |
|
|
char * | response_output_buf, |
|
|
uint16_t | response_output_buf_len ) |
Reads the temperature from the STDS75DS2F and stores it in the provided variable temperature. Temperature range is -55 to 125 degrees celsius with +/- 3 degrees celsius accuracy over the whole range.
- Parameters
-
| args_str |
- Arg 0: Precision we want the temperature to be (9-12 bits).
|
- Returns
- 0 if successful, 1 if error.
- Note
- There are better ways to get the temperature.
◆ TCMDEXEC_obc_set_stm32_sysclk_to_hse()
| uint8_t TCMDEXEC_obc_set_stm32_sysclk_to_hse |
( |
const char * | args_str, |
|
|
char * | response_output_buf, |
|
|
uint16_t | response_output_buf_len ) |
Change the STM32 SYSCLK clock from the HSI to the HSE.
- Parameters
-
- Returns
- 0 on success.
On bootup, the OBC will use the HSI as its clock, as the HSE may have a PCB design defect, where the output capacitance of the HSE clock is too high. Running this command will switch the SYSCLK from the High-Speed Internal (HSI) at 16 MHz to the probably-fine-but-maybe-questionable High-Speed External (HSE) clock at 25 MHz. The main benefit is that the HSE clock is a Temperature-Compensated Crystal Oscillator (TXCO), and thus maintains the system clock much more reliably.
- Note
- To switch back to the HSI, simply reboot.
-
If the HSE fails, the Independent Watchdog will reset. Thus, this reconfiguration is low-risk.