USB virtual com port is not working stably

Hi,

I use STR912FAW44 and keil MDK. My application will run with no issue on USB virtual com port if it boots from bank0. Using USB DFU bootloader to download the main application. Power cycle the device. The application boots from bank1. The USB virtual com port does not work. The wondows shows "USB device is not recognized". After I put the followings in set_system module. The USB virtual com port is recognized. However, the USB com port is not always working. It can work 8 times by 10 times try.

#ifdef Boot_Bank_1
  SCU_EMIBCLKDivisorConfig(SCU_EMIBCLK_Div2);
  SCU_FMICLKDivisorConfig(SCU_FMICLK_Div2);
#endif

In the main application, the MSK setting is as follows:

OPTIONS->TARGET,
IROM1: 0x0000, 0x8000, checked
IROM2: 0x8000, 0x80000, checked.

I am not sure if the setting is correct.

Greatly appreciate any ideas.

Regards,

Lillian

More questions in this forum