cancel
Showing results for 
Search instead for 
Did you mean: 

Able to download to CM4 but not CM0+ (STM32WL5MOC on custom board)

1ntelligentmoron
Associate II

I have developed a custom board with the STM32WL5MOC and I am trying to download a dual core STM32 project to it. I now have two ELF files, one for CM4 and one for CM0+. I am doing by connecting the STLINK-V3SET debugger to 3V3, GND, SWDIO, SWCLK, and NRST pins on the STM32WL5MOC IC.

Using CubeIDE, I have successfully downloaded the ELF file for CM4 and verified that it runs correctly (i.e. interacts with peripherals properly, outputs correct debug messages via UART).

However, (still using CubeIDE), I have not been successful in downloading the ELF file to CM0+ irrespective of my run/debug configurations. I investigated why using CubeProgrammer instead and here are some observations I have made:

  1. I am able to connect to CM4 with no problem, which expected as I can already download to it.
  2. I am unable to connect to CM0+, except in the "hot plug" mode.
  3. Every time before downloading the ELF files, I manually perform a full chip erase, which is successful for both cores.
  4. In hot plug mode, when I try to download my ELF file to CM0+, a download failed error is returned.
  5. However, if I manually inspect the memory content, I can find that part of my ELF file has actually been written to CM0+'s flash memory (for the first 0x6C80 = 27776 Bytes = 27.125 KiB, from 0x08020000 to 08026C7F inclusive). This exact number of bytes is reproducible in all attempts.
  6. For memory addresses beyond 0x08026C80 in CM0+, I am able to manually edit it word-by-word.
  7. While the ELF file starts at 0x08020000 for CM0+, for CM4, it is 0x08000000.

Hopefully the observations I have made will help you answer these questions:

  1. Is my way of connecting the debugger to the STM32 correct (referring to the physical wiring)?
  2. Why is it that I cannot properly connect to CM0+, either through CubeIDE or CubeProgrammer?
  3. Why can I download part of the ELF file for CM0+ for such an arbitrary number of bytes?
  4. How should I download the (whole) ELF file to CM0+?

 

0 REPLIES 0