This error could be caused by a misconfiguration of the communication pins between the STM and the ST-Link or because the microcontroller is in deep sleep mode.Check your .ioc file and go to System Core -> SYS -> Serial Wire.If these settings were di...