cancel
Showing results for 
Search instead for 
Did you mean: 

Unrecognized device on STMFlashloader

Kumar Chaya
Associate II

Hello,

I'm working on STM32l051K8 MCU with the custom board design. I just wanted to enter the device to the bootloader for serial flashing via USART peripheral.

Here is the simple C code to enter into the bootloader for STM32L0xx family MCU.

void JumpToBootloader(void) {

  void (*SysMemBootJump)(void);

  volatile uint32_t addr = 0x1FF00000;

#if defined(USE_FULL_LL_DRIVER)

  LL_RCC_DeInit();

#endif /* defined(USE_LL_DRIVER) */

  /**

   * Step: Disable systick timer and reset it to default values

   */

  SysTick->CTRL = 0;

  SysTick->LOAD = 0;

  SysTick->VAL = 0;

  __disable_irq();

#if defined(STM32L051xx)

  SYSCFG->CFGR1 = 0x01;

#endif

  SysMemBootJump = (void (*)(void)) (*((uint32_t *)(addr + 4)));

  __set_MSP(*(uint32_t *)addr);

  SysMemBootJump();

}

and after entering into the bootloader, we can see 0x7f and 0x79 value in RDR and TDR registers of USART as shown below as per the bootloader requirement for USART.

0693W00000FAHGkQAP.png

But still on STM32Flash loader the device says it is unrecognizable as shown below.

0693W00000FAHHEQA5.pngHere is the STMflash loader settings.

0693W00000FAHFYQA5.pngStill I'm unsure why the software is not recognizing the STM32 MCU. It would be great help from your end if someone help me in fixing the issue.

Thanks!

5 REPLIES 5

>>Still I'm unsure why the software is not recognizing the STM32 MCU.

Old Software

For the L0 you likely need to be using STM32 Cube Programmer in UART mode.

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

Your code also doesn't look to map the ROM properly, and disables interrupts at the CPU level. Nothing turns that on again. UART might work, doubt USB will.

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

0693W00000FAHZIQA5.pngThis is the system memory of the L0. It is 0x1FF00000. Do I need to add any extra offset for this?

Also I tried using STM32 Cube programmer. I'm getting this error.

0693W00000FAHlxQAH.png

Related, could have continued thread https://community.st.com/s/question/0D53W000016N04lSAC/stm32-cube-programmer-not-receiving-0x79-in-uart-mode

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