cancel
Showing results for 
Search instead for 
Did you mean: 

STM23L496 DFU mode, DfuSeDemo not opening, but STM32Programmer yes

AFahr.1
Associate III

Hello,

I'm trying to update a micro over DFU (USB) mode since we don't always have access to the STlink programmer.

I managed to start the unit in System Memory mode by reading a backup register at startup and jumping to system firmware if it's a certain value:

/* Jump into bootloader if backup register 1
	 * has 0xB007104D written
	 */
	if(0xB007104D == RTC->BKP1R)
	{
		RTC->BKP1R = 0x0;
 
		uint32_t  JumpAddress = *(__IO uint32_t*)(SYSMEM_ADDRESS + 4);
		pFunction Jump = (pFunction)JumpAddress;
 
		SysTick->CTRL = 0;
		SysTick->LOAD = 0;
		SysTick->VAL  = 0;
 
		__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH();
 
		__set_MSP(*(__IO uint32_t*)(uint32_t)SYSMEM_ADDRESS);
		Jump();
 
		while(1);
	}

To be honest, I've seen similar flavours of the same code for this purpose.

The thing is, the unit restarts in DFU mode, at least the PC says so:

0693W00000BaUxTQAV.png 

But DfuSeDemo won't give me the option to use it:

0693W00000BaUxEQAV.png 

However, it seems that STM32Programmer works:

0693W00000BaUxjQAF.png 

Questions:

  • Can I use the STM32 programmer to update the user flash with my HEX or DFU file? But then... How do I exit DFU mode????
  • Is there a reason why DfuSeDemo doesn't work? Is there anything else I need to worry about? That one has the handy "leave DFU mode" button.

Any hints are greatly appreciated.

Cheers,

Alberto

1 ACCEPTED SOLUTION

Accepted Solutions
AFahr.1
Associate III
1 REPLY 1
AFahr.1
Associate III

Hi all,

I just noticed that this has been solved elsewhere:

https://community.st.com/s/question/0D50X0000BI0NJhSQN/dfu-bootloader-device-not-showing-up-in-dfuse-demo

Thanks!

Cheers,

Alberto