HID upload for F0 variants #1448
-
Hi, I saw from Here: #1000 |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi @geraldjust |
Beta Was this translation helpful? Give feedback.
-
Sorry though here i might be more promising to get someone who could help, Thanks! |
Beta Was this translation helpful? Give feedback.
-
So i did a couple of experiments. based on the malyan variant for the F070, i used
This is in variant.cpp |
Beta Was this translation helpful? Give feedback.
-
found the problem(s)! first off with inside iniVariant() i added it closer / similar to my original post link. so this: ` volatile uint32_t *VectorTable = (volatile uint32_t *)0x20000000; __HAL_RCC_USB_FORCE_RESET(); __HAL_RCC_USB_RELEASE_RESET();
__HAL_SYSCFG_REMAPMEMORY_SYSTEMFLASH(); __enable_irq();` sysCFG clock must be on so i made sure it was in order for SYSCFG->CFGR1 to work. Then i reset the GPIO and the USB just in case, if the bootloader just finished flashing and jumps right into the program. and this finally make it work. Now the second problem is with the bootloader. since i was using it with a 128kB chip. It uses 2kb page size and the way its written it flashes the full 2k at once. So even if you use the HID-flash program, your program size rounded to to the nearest 1024 bytes. This gave a 50/50 chance that it will flash the whole file or cut it off la last bytes. I will go head and try this from now on with a 64k chip to keep it simple with a 1k page size. Anyways. i think adding this in |
Beta Was this translation helpful? Give feedback.
Hi @geraldjust
Issue is for reporting error not request support. Moreover you already create a topic on this on the forum.
https://www.stm32duino.com/viewtopic.php?f=58&t=1180