Question
Lost SWD debugging Connection at ''__HAL_AFIO_REMAP_CAN1_2(); ''
Posted on November 18, 2015 at 12:26
Dear all,
My development environments are as followings, - STM32F103VET7 - IAR EWARM - STLink/V2 & SWD connection Program download and ''go'' are no problem. But I always failed to stop debugging with communication error message(Target is running, Failed to stop the Target). I tried to find the position where debugger lost the connection and found it as below. __HAL_AFIO_REMAP_CAN1_2() of HAL_CAN_MspInit(); &sharpdefine __HAL_AFIO_REMAP_CAN1_2() MODIFY_REG(AFIO->MAPR, AFIO_MAPR_CAN_REMAP, AFIO_MAPR_CAN_REMAP_REMAP2) The macro is just for AFIO_MAPR remapping(PB8, PB9 for CAN1). I cannot understand why it casued brake debugger connection. If I deleted the line as temporary, ''debugging stop & go'' is possible , but failed to use BxCAN1. Please help me... #swd #stm32 #bxcan #debugger