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
1 Answer 1
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...
-
\$\begingroup\$ What's that about? \$\endgroup\$Spehro 'speff' Pefhany– Spehro 'speff' Pefhany2021年03月22日 10:41:43 +00:00Commented 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\$U.Sim– U.Sim2021年03月23日 05:25:45 +00:00Commented Mar 23, 2021 at 5:25