rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
flash_op_t Struct Reference

One erase or one program, run inside a flash window. More...

Data Fields

uint32_t off
bool erase
bool done
uint32_t window_us
const uint8_t * data
uint32_t len
void(*) call (void *)
void * arg

Detailed Description

One erase or one program, run inside a flash window.

One erase or one program: interrupts off on this core, and core 1 either not launched yet or parked in RAM by the multicore lock-out (flash_window()), for the whole operation. The flash cannot be read while it is being written, and both cores execute from it. That is also why none of this runs while the bank is driving – the caller's loop takes nothing off the CAN controller and steps no output for the length of the window, so a disarm or a command in flight waits for it. Core 1 reads no sensor for it either, and the bank is idle, so no run loses a reading.

Both timestamps are inside the window, because the window is what is being measured: taken either side of it they would also count the lock-out and the restore, and the number is meant to be the time this core answered nothing. The timer is a peripheral and reads with interrupts off.

Field Documentation

◆ arg

void* flash_op_t::arg

the argument of call

◆ call

void(*) flash_op_t::call(void *)

in place of either: the boot ROM's BUY

◆ data

const uint8_t* flash_op_t::data

what a program writes

◆ done

bool flash_op_t::done

the operation ran

◆ len

uint32_t flash_op_t::len

and how many bytes of it

◆ window_us

uint32_t flash_op_t::window_us

how long the window held interrupts off, µs


The documentation for this struct was generated from the following file: