2024-05-05 02:44 AM
i am working with stm32 h750vb and i successfully wrote a winbond W25Q128JVSIQ external loader and it works fine on the cube programmer but when i use the cube ide i found that it successfully erase the external flash before file download and fails to write sector 0 so i found the problem was that i am using the time base source on the external loader was TIM2 and after changing it to systick the cube ide succussed to start writing to the external flash but now i get data mismatch at 0x90008900 on both cube programmer and on the cube ide with the edited external loader unlike the one before and all the data after this address is corrupted . i tried many things but didn't manage to make it upload the data successfully, any help will be appreciated.
Solved! Go to Solution.
2024-05-05 08:56 AM
What is your pin configuration? Perhaps a loader here would suit? I'm not using interrupts.
https://github.com/cturvey/stm32extldr/tree/main/h7_w25q128
2024-05-05 03:35 AM
Instrument the loader via an available UART so you can understand the interactions from STM32 Cube Programmer.
Check the data as you go.
Make sure you're masking the address as the memory is Zero based, it doesn't understand the 0x90000000 address space the STM32 decodes.
2024-05-05 04:52 AM
thank you i managed to make it work but now i face another problem whenever i enable the external loader in the debug tab of the cube ide i found that the interrupts are not working anymore even though i didn't put anything in the external flash yet and when i disable it the interrupts start to work again what could be the reason?
2024-05-05 05:41 AM - edited 2024-05-05 08:57 AM
Make sure that SCB->VTOR points to your vector table, wherever that is now situated in memory. Check SystemInit()
Make sure you dont' leave disableint(), or similar in your code. Or alternatively explicitly enable them in Reset_Handler or SystemInit()
2024-05-05 08:25 AM
sorry for bothering you but know i know what is the problem when i enable the external loader my code stuck here :
2024-05-05 08:51 AM
You can't use an RTOS in the External Loader (.STLDR). Really shouldn't be using/needing interrupts.
The Vector Table can't be at 0x24000004, needs to be on a 512-byte alignment for most STM32
Your Boot Loader to bring up the QSPI at 0x90000000 needs to live in the front of Internal Flash at 0x08000000
2024-05-05 08:56 AM
What is your pin configuration? Perhaps a loader here would suit? I'm not using interrupts.
https://github.com/cturvey/stm32extldr/tree/main/h7_w25q128
2024-05-05 09:13 AM
PB2,PC11 PE7,PE8,PE9,PE10
there is one but it is flm not stldr so it won't work.
2024-05-05 10:42 AM
i didn't use rtos in the code used to generate the external loader but i use it in the code that will be running in the external flash can i do that or not ? and when i enable the external loader in cube ide like the photo the problem above start to happen when running the code even though i didn't specifiy any code to be uploded in external flash in linker script yet and even the all the code sections is running from my stm32 h750 internal flash ,just enabling it dose this problem and i think the initialize option that marked in the photo is the reason because it make the startup code change the address of vector table or something don't know really why is this happening