cancel
Showing results for 
Search instead for 
Did you mean: 

Endless interrupts in VCP USB STM32L

igal
Associate II
Posted on February 12, 2015 at 13:23

Hi,

I use the USB VCP (based on VirtualComport_Loopback) in STM32L152VE.

I disabled suspend (''__IO bool fSuspendEnabled = FALSE;'' in usb_pwr.c).

If the USB cable is disconnected I get endless suspend interrups (ISTR_SUSP) and the function ''Resume(RESUME_LATER);'' in usb_istr.c is constantly executed. how do I solve this?

also bDeviceState value is always ''CONFIGURED'' even after USB cable disconnection.

Ideas?

#suspend #stm32-usb-vcp
4 REPLIES 4
igal
Associate II
Posted on February 15, 2015 at 09:05

no one knows why there are endless suspend interrupts?

tsuneo
Senior
Posted on February 15, 2015 at 12:24

No one knows whats the library you are working on.

And then, no one can answer.

There are so many libraries for ST's MCU, STM32_USB-Host-Device_Lib_V2.1.0, Cube, mbed, Keil, IAR, etc.

Tsuneo

tsuneo
Senior
Posted on February 15, 2015 at 14:13

Google is your friend.

Just enter the keyword ''fSuspendEnabled'', the top hit is the link to

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32L%20EEPROM%20writing%20with%20USB%20VCP%20trouble

.

In the topic, the OP tells the same story as yours,

> I know about Suspend, I tried to prevent going to Suspend by setting > __IO bool fSuspendEnabled = FALSE; /* true when suspend is possible */ > and I thought that it's OK.

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/DispForm.aspx?ID=30622&RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/USB%20CDC%20on%20STM32L%20device%20%20unable%20to%20connect%20to%20host&Source=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/...

Tsuneo

igal
Associate II
Posted on February 18, 2015 at 14:04

Sorry, you are right

I use STM32_USB-FS-Device_Lib_V4.0.0 under IAR