Adding USB port swapping (when supported) to the bootloader
- Every 1000 ms, if no USB connection detected, swap to the other USB port
This commit is contained in:
parent
808e617f9f
commit
571c7ad35a
2 changed files with 44 additions and 2 deletions
|
@ -527,7 +527,7 @@ void ResetHandler()
|
|||
// Also checking for ARM lock-up signal (invalid firmware image)
|
||||
// RCM_SRS1 & 0x02
|
||||
if ( // PIN (External Reset Pin/Switch)
|
||||
RCM_SRS0 & 0x40
|
||||
RCM_SRS0 & 0x40
|
||||
// WDOG (Watchdog timeout)
|
||||
|| RCM_SRS0 & 0x20
|
||||
// LOCKUP (ARM Core LOCKUP event)
|
||||
|
@ -690,11 +690,11 @@ void ResetHandler()
|
|||
|
||||
#endif
|
||||
|
||||
#if !defined(_bootloader_)
|
||||
// Initialize the SysTick counter
|
||||
SYST_RVR = (F_CPU / 1000) - 1;
|
||||
SYST_CSR = SYST_CSR_CLKSOURCE | SYST_CSR_TICKINT | SYST_CSR_ENABLE;
|
||||
|
||||
#if !defined(_bootloader_)
|
||||
__enable_irq();
|
||||
#else
|
||||
// Disable Watchdog for bootloader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue