cancel
Showing results for 
Search instead for 
Did you mean: 

PROBLEM WHEN TRY TO DEBUG

Elmofty
Associate II

HELLO TO ALL

I HAVE A PROBLEM WHEN I BUILD THE CODE AND PROGRAM IT WITH STM32 PROGRAMMER IT IS WORKING BUT WHEN I TRY TO DOWNLOAD THE CODE USING THE IDE WITH DEBUG I GOT ERR  THIS IS THE CONCOL LOG     

ST-LINK SN : 310009000B00004C3359534E

ST-LINK FW : V2J44S7

Board : --

Voltage : 3.27V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x410

Revision ID : Rev X

Device name : STM32F101/F102/F103 Medium-density

Flash size : 64 KBytes

Device type : MCU

Device CPU : Cortex-M3

BL Version : --

 

 

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_a32112.srec

File : ST-LINK_GDB_server_a32112.srec

Size : 2.26 KB

Address : 0x08000000

 

 

Erasing memory corresponding to segment 0:

Erasing internal memory sectors [0 2]

Download in Progress:

 

 

File download complete

Time elapsed during download operation: 00:00:00.244

 

 

 

Verifying ...

 

 

 

 

Download verified successfully

 

 

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Shutting down...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

Target is not responding, retrying...

 

 

 

AFTER I GOT IT I TRY TO CONNECT TO THE DEVICE WITH THE STM32 PROGRAMER I GOT ERR

6 REPLIES 6
SofLit
ST Employee

Hello,

What message you had with STM32CubeProgrammer? can you share a screenshot?

Are you using low power modes?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
TDK
Guru

Perhaps you are repurposing the SWD pins, PA13/PA14, and/or going into low power modes where debug is not possible.

What does your code do?

If you feel a post has answered your question, please click "Accept as Solution".
Elmofty
Associate II

Error: no stm32 target found! if your product embeds Debug Authentication , please perform a discovery using Debug Authentication     it cannot acces the stm32 device so to access it i make it in usb mode connecting the boot0 to high then i can access the device i can erase then i can download file to it

As I said I suspect there is a low power mode in your example you load into your MCU.

And if you download any other example, do you face the same behavior?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

So

Putting the device into low-power modes where the critical pins and electronics are TURNED OFF, and thus non-communicative.

The pins have been reused or reassigned from their debug use cases.

The debug interface JTAG/SW has been explicitly disabled, or a sub-set of the pins disabled.

Please review the DATA SHEET and REFERENCE MANUAL (RM0008) in this CONTEXT.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Elmofty
Associate II

thanks alot i have fix this by regenerat the code it is ok now

another point need to help i add in my code to print in SWV ITM DATA CONSOLE IT CANNOT ADD ANY THIS IS MY MAIN CODE JUST FOR TRST DEBUG

 

 

I ADD #include <stdio.h>

 

THEN IN THE MAIN I ADD

while (1)

{

/* USER CODE END WHILE */

 

// Print the formatted string

printf("HELLO\n");

HAL_Delay(1000);

/* USER CODE BEGIN 3 */

}

/* USER CODE END 3 */

}

 

 

 

AND AT THE ED OF THE CODE I ADD

/* USER CODE BEGIN 4 */

int _write(int file, char *ptr, int len)

{

(void)file;

int DataIdx;

 

for (DataIdx = 0; DataIdx < len; DataIdx++)

{

ITM_SendChar(*ptr++);

}

return len;

}

/* USER CODE END 4 */

I AM USING STM32F103C8T6