Reset USB controller endpoints when starting

When starting, reset the USB controller to only enable the USB CDC
endpoint and the internal command channel. If the app resets firmware,
but had differend endpoints enabled, we want to go back to a known
state.
This commit is contained in:
Michael Cardell Widerkrantz 2025-05-07 17:31:44 +02:00
parent daa7807c0f
commit 8965fea947
No known key found for this signature in database
GPG key ID: D3DB3DDF57E704E5
4 changed files with 15 additions and 7 deletions

View file

@ -525,6 +525,10 @@ int main(void)
assert(1 == 2);
}
// Reset the USB controller to only enable the USB CDC
// endpoint and the internal command channel.
config_endpoints(IO_CDC | IO_CH552);
led_set(LED_WHITE);
#if defined(SIMULATION)