We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everyone.
I'm making a bootloader for the GD32E103, and i can't write on memory, even using the libraries from gigadevice.
This is a simple code i made to test it.
int main(void) { SysTick_Config(SystemCoreClock / Systick_Frequency); NVIC_SetPriority(SysTick_IRQn, 2); Setup(); //just configuring ports, timers and others update = Decide_Update(); if(update) Update_Setup(); //Here is where i configure the fmc /* Infinite loop */ while (1) {;} } void Update_Setup(void) { fmc_prefetch_enable(); fmc_unlock(); fmc_program_width_set(FMC_PROG_W_32B); fmc_dbus_enable(); fmc_ibus_enable(); } void TIMER1_IRQHandler(void) { if(timer_interrupt_flag_get(TIMER1, TIMER_FLAG_UP) != RESET) { if(update) { stado = fmc_word_program(0x08004000, 0xaabbccdd); fmc_flag_clear(FMC_FLAG_END); } timer_interrupt_flag_clear(TIMER1,TIMER_FLAG_UP); } }
Don't getting any problem erasing the pages, or that seems, but when write, didn't change the memory bytes and didn't get any error in the fmc bytes.
I will apreciate so much some help, this is getting me mad.
Ty :)
JosepI said:using the libraries from gigadevice.
using the libraries from gigadevice.
So have you contacted Gigadevice for support with their libraries ?
Found the error.
fmc_program_width_set(FMC_PROG_W_32B); Sets '1' to the PGW bit of the WS register, and have to set a '0', i used FMC_PROG_W_64B instead to get a 32bit BW.
There is an error on the library.
I'm trying to upload the DFU/Serial bootloader from stm32duino to this IC using ST link v2 on a bluepill board. It uploads but the usb isn't recognized. the LED on PC_13 keeps on blinking. To confirm the HW, i swapped the IC with an STM32F103C8T6 and the generic bootloader and its working. Any suggestions to make it work? I tried all the bootloaders on: github.com/.../bootloader_only_binaries