0
votes

I need your help as i am working on a MCU STM32f439ZI and IAR IDE 7.40,and working on a USB OTG boot loader downloaded from below link.

"https://github.com/mechoid9/STM32F4/tree/master/STM32F4-Discovery_FW_V1.1.0/Project/FW_upgrade"

i have tested this boot loader with STM32F407 discovery board which is working perfectly fine.

but this same boot loader is not work with my custom board,

From the schematic of discovery board it can be seen that PA9 pin is needed for VBUS supply,which is being trigger by PC0 using switching mechanism.

Now in my case the PA9 pin is connected with other interface and i amusing external (5 v) supply (using PC and made common ground with mycustom board) also ID pin is not connected anywhere.

I also refereed the datasheets and tried to with OTG_FS_GCCFG 's "NOVBUSSENS" bit but it dose not recognize the USB connect/disconnect even i tried to remove those functionalities (which detects USB plugin events)as i found that connection/disconnected event can be recognized by VBUS's status, but though it dose not functioning .

So now my quires are as per below,

1) Do i compulsorily need to have a switch connected to supply VBUS from PA0/PB13 (as per data sheet) ?

2) Is NOVBUSSENS work in this scenario or is there any other way to function this above boot loader without PA9 and VBUS connection ?

3) If above is true then is there any guidance or document available ?

Please let me know if i can provide more details. Any help on this would be great appreciable.

Thanks & Regards, RUTVIJ

1

1 Answers

0
votes

Use the builtin DFU

Many of the ST ARM chips have a DFU utilitys built in. To use it you need to raise BOOT0 and plug in. Full documentation is available from ST. AN3156 The code is currently here although it might move from time to time look for DFUSE on the ST site. There is a video on You tube

Using VBUS for normal USB

1) USB either compiles for or without VBUS signaling depending on a flag set in Cube.

2) ST provide all necessary docs and software concerning DFU and USB on their product pages. They also provide working DFU. You need to raise BOOT0 and possibly BOOT1 depending on the device you have.

3) You can write your own DFU, its not magic, all it does is look for a specific file name on USB and write the contents to Non Volatile memory.

Go through the bootloader code you have (or STs) and see how they trigger if you want specific operation, for example live update of a working device.

It is possible to have multiple copies of firmware loaded in flash, then choose which one to run either by setting pins, or by writing to the boot address