AnsweredAssumed Answered

STM32 application while(1) loop stops after 60 seconds only when UART running

Question asked by Reddy.Harinadha on Sep 11, 2013
Latest reply on Sep 12, 2013 by Reddy.Harinadha
Hello,
I'm developing firmware(FW) for STM32F103RE mcu, an USB & UART bluetooth module (PAN1321i) connected to mcu. Application has 4 working modes. In all the FOUR modes FW supposed to send & receive data to USB or bluetooth or to both. Computer initiates connection to the device via USB virtual COM port or Bluetooth COM port.
1. FW works fine when USB virtual COM port opened in PC.
2. FW does work fine when USB virtual COM port & Bluetooth COM port opened in PC.
3. FW stops executing while(1) loop after 60 seconds when only Bluetooth COM port opened in PC.
4. FW works fine (doesn't sends & receives data if USB or Bluetooth ports are not opened)
In hardware the UART2 of STM32 connected to Bluetooth module. When I open Bluetooth COM port in PC and send some bytes, I can see the data received in USART2 Rx interrupt handler when debugging the FW using breakpoints in IAR EWARM. But the while(1) loop is not running. Now If I open USB virtual COM port, again the FW sends & receives data via Bluetooth. 
Now If I close the USB virtual COM port, again the while(1) loop stops running after 60sec.
What is this behavior ? Is the STM32 going into sleep mode when USB not connected ?
I do not have any code which will place STM32 into sleep mode.
Thanks in advance.

Outcomes