|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include "board_bringup.h"#include "board.h"#include "board_adc.h"#include "board_spi.h"#include "board_time.h"#include "board_uart9.h"#include "cmsis_os2.h"#include "gnss_frame.h"#include "main.h"#include "sd_spi.h"Go to the source code of this file.
Functions | |
| static void | enable (board_bringup_t *b, uint16_t device_id) |
| static void | wait_since_boot (uint32_t ms) |
| static bool | ms5611_reset (void) |
| static self_test_reply_t | reply (self_test_result_t result, int32_t diag) |
| static bool | uart9_set_baud (uint32_t baud) |
| static self_test_reply_t | gnss_probe (board_bringup_t *b, uint8_t attempt, uint32_t budget_ms) |
| static board_spi_status_t | sd_command (uint8_t index, uint32_t arg, uint8_t *r1, uint8_t *extra, uint8_t extra_len, uint32_t deadline) |
| static board_spi_status_t | sd_read_cid (uint8_t *r1, uint8_t cid[16], uint32_t deadline) |
| static self_test_reply_t | sd_fail (board_spi_status_t st, int stage, uint8_t r1) |
| static self_test_reply_t | sd_nand_probe (uint32_t budget_ms) |
| static self_test_reply_t | emmc_identify (void) |
| static self_test_reply_t | emmc_probe (board_bringup_t *b) |
| void | board_bringup_power_up (board_bringup_t *b) |
| self_test_battery_t | board_bringup_read_battery (void *context, uint32_t now_ms, uint32_t budget_ms) |
| bool | board_bringup_on_usb (void) |
| self_test_reply_t | board_bringup_probe (void *context, uint16_t device_id, uint8_t attempt, uint32_t now_ms, uint32_t budget_ms) |
Variables | |
| UART_HandleTypeDef | huart9 |
| MMC_HandleTypeDef | hmmc1 |
| bool board_bringup_on_usb | ( | void | ) |
Definition at line 393 of file board_bringup.c.
References GPIO_PIN_RESET, HAL_GPIO_ReadPin(), SW_ST_GPIO_Port, and SW_ST_Pin.
Referenced by bringup_task(), and on_usb().
| void board_bringup_power_up | ( | board_bringup_t * | b | ) |
Definition at line 286 of file board_bringup.c.
References b, board_adc_init(), board_deadline_passed(), board_now_ms(), board_spi_init(), board_spi_self_test_exchange(), board_time_start(), EMMC_RST_GPIO_Port, EMMC_RST_Pin, enable(), ETH_RST_GPIO_Port, ETH_RST_Pin, GPIO_PIN_SET, HAL_GPIO_ReadPin(), HAL_GPIO_WritePin(), ms5611_reset(), NULL, osDelay(), RADIO_BUSY_GPIO_Port, RADIO_BUSY_Pin, RADIO_NRST_GPIO_Port, RADIO_NRST_Pin, REG_3V6_EN_GPIO_Port, REG_3V6_EN_Pin, SELF_TEST_DEVICE_BAROMETER, SELF_TEST_DEVICE_ETHERNET, SELF_TEST_DEVICE_HIGH_G, SELF_TEST_DEVICE_IMU, SELF_TEST_DEVICE_RADIO, and wait_since_boot().
Referenced by bringup_task().
| self_test_reply_t board_bringup_probe | ( | void * | context, |
| uint16_t | device_id, | ||
| uint8_t | attempt, | ||
| uint32_t | now_ms, | ||
| uint32_t | budget_ms ) |
Definition at line 399 of file board_bringup.c.
References b, emmc_probe(), gnss_probe(), r, sd_nand_probe(), SELF_TEST_DEVICE_EMMC, SELF_TEST_DEVICE_GNSS, SELF_TEST_DEVICE_NAND, self_test_devices_probe(), and SELF_TEST_NOT_CONFIGURED.
Referenced by bringup_task().
| self_test_battery_t board_bringup_read_battery | ( | void * | context, |
| uint32_t | now_ms, | ||
| uint32_t | budget_ms ) |
Definition at line 364 of file board_bringup.c.
References b, battery(), board_adc_read(), BOARD_ADC_VBAT, board_now_ms(), reply(), SELF_TEST_FAIL, SELF_TEST_NOT_CONFIGURED, SELF_TEST_PASS, and start().
Referenced by bringup_task(), and read_battery().
|
static |
Definition at line 259 of file board_bringup.c.
References BOARD_EMMC_DIAG_STATE, board_soft_init(), HAL_OK, hmmc1, MX_SDMMC1_MMC_Init(), reply(), SELF_TEST_FAIL, SELF_TEST_PASS, and state.
Referenced by emmc_probe().
|
static |
Definition at line 275 of file board_bringup.c.
References b, emmc_identify(), reply(), and SELF_TEST_NOT_CONFIGURED.
Referenced by board_bringup_probe().
|
static |
Definition at line 16 of file board_bringup.c.
References b, and SELF_TEST_DEVICE_ENABLED.
Referenced by board_bringup_power_up(), QwDevISM330DHCX::enableSensorI2C(), QwDevISM330DHCX::enableTimestamp(), daq_comms::transport::UDPSocket::set_broadcast(), fsw::streams::SensorFramePipeline::set_broadcast(), QwDevISM330DHCX::setAccelFilterLP2(), QwDevISM330DHCX::setAccelStatustoInt1(), QwDevISM330DHCX::setAccelStatustoInt2(), QwDevISM330DHCX::setBlockDataUpdate(), QwDevISM330DHCX::setDeviceConfig(), QwDevISM330DHCX::setFifoWtmToInt2(), QwDevISM330DHCX::setGyroFilterLP1(), QwDevISM330DHCX::setGyroStatustoInt1(), QwDevISM330DHCX::setGyroStatustoInt2(), QwDevISM330DHCX::setHubFifoBatching(), QwDevISM330DHCX::setHubPassThrough(), QwDevISM330DHCX::setHubPullUps(), ADS126X::setOutputmagnitudeTDACP(), ADS126X::setOutputTDACN(), ADS126X::setOutputTDACP(), and ADS126X::setReference().
|
static |
Definition at line 70 of file board_bringup.c.
References __HAL_UART_CLEAR_FLAG, b, board_deadline_passed(), BOARD_GNSS_DIAG_ANTENNA_SHORT, BOARD_GNSS_LISTEN_MS, board_ms_left(), board_now_ms(), gnss_frame_feed(), gnss_frame_init(), GNSS_FRAME_NONE, GPIO_PIN_RESET, GPS_ANT_STATUS_GPIO_Port, GPS_ANT_STATUS_Pin, HAL_GPIO_ReadPin(), HAL_OK, HAL_UART_Receive(), huart9, reply(), SELF_TEST_FAIL, SELF_TEST_NOT_CONFIGURED, SELF_TEST_PASS, SELF_TEST_TIMEOUT, uart9_set_baud(), UART_CLEAR_FEF, UART_CLEAR_NEF, UART_CLEAR_OREF, and UART_CLEAR_PEF.
Referenced by board_bringup_probe().
|
static |
Definition at line 33 of file board_bringup.c.
References board_now_ms(), BOARD_SPI_BARO, board_spi_deselect(), board_spi_lock(), BOARD_SPI_OK, board_spi_select(), board_spi_shift(), board_spi_unlock(), NULL, and osDelay().
Referenced by board_bringup_power_up().
|
static |
Definition at line 50 of file board_bringup.c.
Referenced by board_bringup_read_battery(), emmc_identify(), emmc_probe(), gnss_probe(), sd_fail(), and sd_nand_probe().
|
static |
Definition at line 112 of file board_bringup.c.
References board_spi_deselect(), BOARD_SPI_NAND, BOARD_SPI_OK, board_spi_select(), board_spi_shift(), frame(), NULL, sd_command_frame(), and sd_is_r1().
Referenced by sd_nand_probe().
|
static |
Definition at line 167 of file board_bringup.c.
References BOARD_SPI_TIMEOUT, reply(), SELF_TEST_FAIL, and SELF_TEST_TIMEOUT.
Referenced by sd_nand_probe().
|
static |
Definition at line 180 of file board_bringup.c.
References board_deadline_passed(), board_now_ms(), BOARD_SD_INIT_MS, BOARD_SD_STAGE_ACMD41, BOARD_SD_STAGE_CMD0, BOARD_SD_STAGE_CMD10, BOARD_SD_STAGE_CMD58, BOARD_SD_STAGE_CMD8, board_spi_idle_clocks(), board_spi_lock(), BOARD_SPI_NAND, BOARD_SPI_OK, BOARD_SPI_TIMEOUT, board_spi_unlock(), NULL, osDelay(), reply(), result, SD_ACMD41_HCS, SD_ACMD41_SD_SEND_OP_COND, sd_cid_ok(), SD_CMD0_GO_IDLE, SD_CMD55_APP_CMD, SD_CMD58_READ_OCR, SD_CMD8_ARG, SD_CMD8_SEND_IF_COND, sd_command(), sd_fail(), SD_OCR_CCS, SD_R1_IDLE, sd_r7_ok(), sd_read_cid(), and SELF_TEST_PASS.
Referenced by board_bringup_probe().
|
static |
Definition at line 135 of file board_bringup.c.
References board_spi_deselect(), BOARD_SPI_NAND, BOARD_SPI_OK, board_spi_select(), board_spi_shift(), frame(), NULL, SD_CMD10_SEND_CID, sd_command_frame(), SD_DATA_TOKEN, sd_is_r1(), and token.
Referenced by sd_nand_probe().
|
static |
Definition at line 55 of file board_bringup.c.
References board_uart9_apply_baud(), and huart9.
Referenced by gnss_probe().
|
static |
Definition at line 21 of file board_bringup.c.
References board_now_ms(), and osDelay().
Referenced by board_bringup_power_up().
|
extern |