Randy Stakelbeek

STM32F469NI firmware update through USB only

Discussion created by Randy Stakelbeek on Oct 27, 2017
Latest reply on Nov 29, 2017 by Tilen MAJERLE

Hello everybody, I have a custom PCB with an STM32F469NIH6 processor and want to upload firmware through USB using the DFU bootloader.

 

NOTE: Only the USB-port is physically reachable.

 

I have searched for solutions and found a method to jump to the bootloader in the following video. After trying several different addresses I still can't get my board to be recognized by the Dfuse program, so I am not able to upload new firmware the way I want to.

link to video

 

I have also read somewhere that the bootloader still want to have the boot pin set to be able to start in dfu-mode, but so far I have had no luck in doing so either.

 

I have to admit that I am more of an application-level programmer, so my understanding of some of the low-level code is limited.

 

the main code I used (I am using STM workbench):

int main(void) {

   // start infinite loop
   while (1) {
      BootLoaderInit(1);
   } // END infinite loop
}

 

void BootLoaderInit(uint32_t BootLoaderStatus) {
   SysMemBootJump=(void (*) (void)) (*((uint32_t *) 0x1fff0004)); // address from AN2606, table 3
   if (BootLoaderStatus == 1) {
      SysTick->CTRL = 0;
      SysTick->LOAD = 0;
      SysTick->VAL = 0;

      // __set_PRIMASK(1);   // this should not be done when using USB/DFU

      __set_MSP((uint32_t) 0x20002dc0);
      SysMemBootJump();

      while(1);
   }
}

I have tried several different addresses to see whether that would be the problem, but neither combination seems to work for me.

function pointer:

0x1fff0000 (start bootloader from video),

0x1fff0004 (start bootloader from video +4),

0x1fff76de (start bootloader from AN2606),

0x1fff76e2 (start bootloader from AN2606 + 4)

for the memory pointer:

0x20001000 (content from video),

0x20002dc0 (content from my address 0x1fff0000),

0xffff0090 (content from my address 0x1fff76de),

0x1fff76de (same as bootloader start from AN2606)

 

I'm at a loss, can you help me out?

Outcomes