28 #define printf_mutex(...) 31 #define TASK_COMM_PERIOD_MS 1 32 #define TASK_LOGGER_PERIOD_MS 1 33 #define TASK_WIFI_PERIOD_MS 10 34 #define TASK_MAINT_PERIOD_MS 10 35 #define TASK_MAINT_SLOW_SEC_PERIOD_MS 1000 38 #define TASK_COMM_STACK_SIZE (8192/sizeof(portSTACK_TYPE)) 39 #define TASK_MAINT_STACK_SIZE (4096/sizeof(portSTACK_TYPE)) 41 #define TASK_LOGGER_STACK_SIZE (8192/sizeof(portSTACK_TYPE)) 42 #define TASK_WIFI_STACK_SIZE (2048/sizeof(portSTACK_TYPE)) 44 #define TASK_COMM_PRIORITY (tskIDLE_PRIORITY + 4) // Highest 45 #define TASK_LOGGER_PRIORITY (tskIDLE_PRIORITY + 3) 46 #define TASK_WIFI_PRIORITY (tskIDLE_PRIORITY + 2) 47 #define TASK_MAINT_PRIORITY (tskIDLE_PRIORITY + 1) 61 #ifdef CONF_BOARD_CAN_TEST 130 #if STREAM_INS_FOR_TIME_SYNC // Stream INS message on startup. Necessary to update EVB RTC for correct data log date and time. 161 uint32_t m2sPeriodMs = 0;
227 XDMAC->XDMAC_GID = 0xFFFFFFFF;
229 XDMAC->XDMAC_CHID[i].XDMAC_CID = 0xFFFFFFFF;
256 #ifdef CONF_BOARD_SPI_ATWINC_WIFI // ATWINC WIFI 271 printf(
"Starting FreeRTOS\n\r");
void uINS_stream_stop_all(is_comm_instance_t &comm)
void vTaskStartScheduler(TaskHandle_t *idleTaskHandle, TaskHandle_t *timerTaskHandle) PRIVILEGED_FUNCTION
void wdt_restart(Wdt *p_wdt)
Restart the watchdog timer.
#define UNUSED(v)
Marking v as a unused parameter or value.
void board_init(void)
This function initializes the board target resources.
void sd_card_maintenance(void)
static void vTaskLogger(void *pvParameters)
RTOS logger task.
int serInit(int serialNum, uint32_t baudRate, sam_usart_opt_t *options, uint32_t *overrunStatus)
Initialize serial port with specific USART/UART and DMA settings. If not NULL, the overrun status wil...
#define XDMAC
(XDMAC ) Base Address
void board_IO_config(void)
void mcan_test_slave(void)
uint32_t wdt_get_timeout_value(uint32_t ul_us, uint32_t ul_sclk)
Get counter value or permitted range value of watchdog timer from the desired timeout period (in us)...
rtos_task_t task[UINS_RTOS_NUM_TASKS]
void udc_stop(void)
Stop the USB Device stack.
void communications_init(void)
#define TASK_WIFI_PRIORITY
#define WDT
(WDT ) Base Address
void step_user_interface()
void velocity_control(is_comm_instance_t &comm)
static bool ioport_get_pin_level(ioport_pin_t pin)
Get current value of an IOPORT pin, which has been configured as an input.
void nvr_slow_maintenance(void)
#define TASK_COMM_STACK_SIZE
#define EVB2_CB_PRESET_DEFAULT
void refresh_CFG_LED(void)
#define TASK_LOGGER_PRIORITY
#define TASK_MAINT_SLOW_SEC_PERIOD_MS
uint32_t g_uInsBootloaderEnableTimeMs
#define WDT_MR_WDDBGHLT
(WDT_MR) Watchdog Debug Halt
#define TASK_MAINT_PERIOD_MS
static void vTaskMaint(void *pvParameters)
RTOS maintenance task.
void rtos_monitor(int numRtosTasks)
#define TASK_COMM_PERIOD_MS
void is_comm_init(is_comm_instance_t *instance, uint8_t *buffer, int bufferSize)
#define MAX_TASK_NAME_LEN
evb_flash_cfg_t * g_flashCfg
void update_led_log(void)
#define TASK_LOGGER_PERIOD_MS
void vTaskWiFi(void *pvParameters)
void step_logger_control(cISLogger &logger, is_comm_instance_t &comm)
void sd_card_logger_init(void)
#define TASK_LOGGER_STACK_SIZE
void step_com_bridge(is_comm_instance_t &comm)
#define XDMACCHID_NUMBER
Xdmac hardware registers.
void vTaskDelay(const TickType_t xTicksToDelay) PRIVILEGED_FUNCTION
void time_sync_from_uINS(void)
#define TASK_WIFI_PERIOD_MS
static void vTaskComm(void *pvParameters)
#define TASK_WIFI_STACK_SIZE
Autogenerated API include file for the Atmel Software Framework (ASF)
CTRL_ACCESS interface for common SD/MMC stack.
void wdt_init(Wdt *p_wdt, uint32_t ul_mode, uint16_t us_counter, uint16_t us_delta)
Initialize watchdog timer with the given mode.
#define TASK_COMM_PRIORITY
#define WDT_MR_WDRSTEN
(WDT_MR) Watchdog Reset Enable
char name[MAX_TASK_NAME_LEN]
#define TASK_MAINT_STACK_SIZE
#define BOARD_FREQ_SLCK_XTAL
int createTask(int index, pdTASK_CODE pxTaskCode, const char *const pcName, unsigned short usStackDepth, void *pvParameters, unsigned portBASE_TYPE uxPriority, portTickType xTimeIncrement)
void log_uINS_data(cISLogger &logger, is_comm_instance_t &comm)
#define TASK_MAINT_PRIORITY