2015-01-11 04:30 AM
When I debug the usb of stm32f103, using ST firmware library and st-link .
Will appear the following questions:
I want to suspend operation, but the IAR will be prompted to me that ''Target is running,Failed to stop the target''!!
If I delete the code:
/*NVIC_InitStructure.NVIC_IRQChannel = USB_LP_CAN1_RX0_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 6; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 7; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); NVIC_InitStructure.NVIC_IRQChannel = USBWakeUp_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 5; NVIC_InitStructure.NVIC_IRQCha */There is no problem for debug
Why ??? (My English ability is very poor, but I tried my best to in the description
)2015-01-11 06:09 AM
Is the chip going into a low power mode?
2015-01-11 06:18 AM
I didn't set the low power mode。
Is affected the debug registers when setting USB interrupt?
Where I find for a long time always can't find the problem.
I tried to use the STM32 ST - LINK Utility for debug, the dialog will appear:“Can't run core while booting form FLASH memory and read out protection is activated�?
2015-01-11 06:33 AM
You need to comment out any code putting the device into low power mode.
It's going to be hard to debug USB by stopping it in a debugger, it has real-time requirements which it will fail to meet while waiting for you to respond.2015-01-11 06:38 AM
oh,
I will probably understand.
When a USB into pending state, STM32 into low power mode, is it?