2018-08-20 11:29 AM
Hello,
I am using cortex M microcontroller, working with STM32F051 microcontroller on discovery kit. IDE- Keil. I am trying to do a project using ADC. I have assigned one pin as ADC using an industrial accelerometer. when I am trying to operate the accelerometer and note the readings of it while debugging i am getting an error that." cannot access target shutting down debugging session". But when I am trying to operate the same pin with variable resistor( potentiometer) it works!!!. How can I solve this problem?
One thing I would like to mention is, when ever I am making any movement it can be traced in multimeter but I cannot able to access in keil
-
Thanks,
Ashok
2018-08-20 12:27 PM
Going into Low Power state is a frequent problem. ie WFI in idle/wait loop
Interfering with the SWDIO/SWCLK GPIO pins. ie GPIOA PA13/PA14
DBGMCU settings
WATCHDOG, STANDBY or RESET
2018-08-21 08:28 AM
>>Could you elaborate your answer to the question cannot access the target. You are saying I will have to use SCLK? or use an external oscillator instead of inbuilt oscillator ?
No, I'm saying that if the interface to SWDIO/SWCLK powers down or the pin configuration is messed with connection to the device will be lost.
The alternative to using the debuggers SWD interface is to output telemetry via a USART.
Make sure you moving the system about isn't cause a power issue, or loss of continuity, and causing the core to reset.