2013-03-06 03:35 PM
Hi all i have to write an interface program for write to the stm32f40x's flash. I did a control system but users want to change some parameters on program but i can't give them the sources. I must write bootloader program and it must go on pc and controller must on read and write protect mode and i want to send go on unprotect mode (just for write) and write to flash and go again write protected mode. Is it possible or not?? I did not find any document about that. I'm looking for something about that but just find flash programming documents and i just know stm32f40x has the own bootloader.
2013-03-06 04:28 PM
Are you looking to rewrite the application or just the parameters/configuration?
You might want to review the app notes related to IAP (In Application Programming). I'm not totally sold on the write protect aspect, but a protected boot loader, that can update an application firmware, or configuration block are certainly doable. Have you done anything similar on a micro-controller platform before?2013-03-07 08:26 AM
''users want to change some parameters''
That seems perfectly reasonable - have you not provided any means for them to configure parameters? Rebuilding & downloading the entire application just to adjust parameters sounds like madness!!2013-03-08 04:17 AM
I use controller just in student projects before but i understood it i don't need bootloader just i have to write these parameters on a flash address and when they want to update them just send with uart or any communication peripheral and controller update parameters on flash address.
2013-03-08 04:27 AM
You can change various flash locations using openocd, you can also implement a response-reply API for USART and change parameters via that. Parameters are just variables that can be changed when running program (if I understood you right). Otherwise like some said: flashing to change parameters of program is a mess. Implement some sort of ''Talking system'' with uC (button-led, button-display,button-usart, usart-usart,...) so that you can check parameters and adjust them ''on fly''.
There is some programing bootloader manual somewhere but I have it only for stm32f2...2013-03-09 03:55 AM
thank you for all comments. yes crt you understood right just parameter changing when program is running and i will use uart for communication. Thanks to all comments again.