CR-Formula / Telem

Cyclone Racing's Real Time Telemetry System
GNU General Public License v3.0
1 stars 0 forks source link

Setup Hardware Delay timer #23

Closed APBashara closed 5 days ago

APBashara commented 1 month ago

Will be used for timeout calculations and delays during setup

APBashara commented 1 week ago

Look at the Data watchpoint and trace timer

void delay_us(uint32_t us) {
    uint32_t start = DWT->CYCCNT;
    uint32_t cycles = us * (SystemCoreClock / 1000000);
    while (DWT->CYCCNT - start < cycles);
}
APBashara commented 5 days ago

May not really need this, any and all delays going forward should be non-blocking as we need to improve system performance