1
\$\begingroup\$

Im having problem at debugging, tried to load basic led toggle program for test purpose and its work fine but when i tried to debug it, im getting " Cannot Access Target, Shutting Down Debug Session ". My other concern is this device has 256 KBytes Flash Memory though at keil there is only 512 KBytes option. Hoping to get some information from you about this problem. Thanks for your time.

MCU = STM32F103CVT6

IDE= Keil 5.34.0.0

Debug_Settings_1 Debug_Settings_2 Command Error Debug Error Type

asked Mar 22, 2021 at 8:00
\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Well i though this problem was kinda weird but when i found out cubemx generated this code "__HAL_AFIO_REMAP_SWJ_DISABLE();" in "void HAL_MspInit(void)" function. I kinda laughed ^^ and delete it. People who have a similar problem hope will see this answer before spending much time...

answered Mar 22, 2021 at 9:40
\$\endgroup\$
2
  • \$\begingroup\$ What's that about? \$\endgroup\$ Commented Mar 22, 2021 at 10:41
  • 1
    \$\begingroup\$ Basically disables the SWJ pin for using other purposes. I m writing %99 of my code manually without using cubemx, so when i tried cubemx, did not know that at default settings it disables the debug pin. \$\endgroup\$ Commented Mar 23, 2021 at 5:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.