1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "soc_api.h"
#include "app_log.h"
#include "usb_dfu.h"
 
void on_usb_dfu_enter(void)
{
#if APP_LOG_EN
    APP_LOG_INFO("Entering USB DFU flow..\n");
    soc_busy_wait(10000); // Wait for print done
#endif
 
    SYS_UnlockReg();
    CLK_ResetSystemToRomMode();
    SYS_LockReg();
}