cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK flashed code does not run, and st-link can no longer be connected

Yunlion
Associate II

I am working on a project using STM32N6570-DK. I now have a big problem with (1) how to run my code in a Flash and (2) how to connect the ST-LINK to stm32cube ide.

  • I created a project “AYA” in cube IDE . Cube IDE asked if it is FSBL project or application project. I chose application, and all my work after are done within AYA_appli
  • I finished the coding and testing from debug version to release version. Both with ST-LINK connected (with is integrated in the DK), and boot1/boot2 keys are set =00. My code runs correctly.
  • TROUBLES came after the FLASH: I used STM32CubeProgrammer to write my .bin file to the -dk board.
    1.  boot0/boot1=11,
    2. I chose this external bootloader  (MX66UW1G45G_STM32N6570-DK ) 
    3. Erasing the full chip
    4. Write my code (start address =0x07000000) to the flash and “verify successfully”
    5. Now, I switch boot0/boot1=00, and press the RESET button. However, NOTHING happens‼
    6. To make things WORSE: I switched back to the IDE environment, it says “Target unknown error 32   Error in initializing ST-LINK device. Reason: Unknown. Please check power and cabling to target” 

Question 1: how can I now be back to CUBE IDE env. with st-link connected?

Question 2: How can I run my code on board after power-on-reset?

Thank you!!

1 REPLY 1
Imen.D
ST Employee

Hello @Yunlion 

Did you check the recommendation in this article: How to solve connection errors when connecting and programming the STM32 target board.

Ensure your application is programmed with the correct boot pins and option bytes to select that memory as the boot source.

I recommend you follow the instructions in the UM3249 on "5 Getting started with STM32CubeN6" section and how "Running an example or an application" .

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen