2009-10-08 11:03 PM
STM32 readout protection via uVision and Ulink
2011-05-17 04:25 AM
Hello,
I'm trying to enable STM32 readout protection via Keil Ulink. I defined a ROM1 area starting from 0x1FFFF800 up to 0x1FFFF80F. I created a new c module containing two lines only: #include ''RTL.h'' const U32 optionByte[] = {0x00FF00FF}; I put optionByte[0] = optionByte[0] into main to force linker to include it. I added the ''STM32F10x Flash Options'' into ''Programming Algorithm''. I enabled the ''Erase Sectors'' option instead ''Erase Full Chip'' as suggested in http://www.keil.com/support/docs/3454.htm If I burn the device, uVision told programming was done, but the device doesn't work. Obiuvsly, I cannot check why via JTAG, because the device is read protected. If I disable the option programming, the device works. I'd like to know if it's possible to enable the readout protection via Ulink under uVision. Thanks, Lorenzo[ This message was edited by: lorenzo.raschi on 08-10-2009 13:03 ]2011-05-17 04:25 AM
You should start be examining the .map file created by your project to confirm it is putting the data where you are expecting it to go. It probably is not.
You might consider the Flash Loader demonstration program (UM0462) which permits control/configuration of the device through UART1. If you can't control the BOOT pins you can always add code into the startup routines to execute the Boot Loader under conditions of your choosing. You might also consider detecting the state of the option bytes within your own code or startup code, and automatically programming into the desired locked state if it finds them unlocked. I would imagine Segger's J-Link provides a method of doing it through the tools command line interface, this was certainly the case for the STR912, but I haven't looked at it recently. The J-Link has better support than the ULink, and they have tools targeting factory/automated programming. -Clive2011-05-17 04:25 AM
Hello,
I got a solution in the Keil forum; if someone is interested in, the link is . I checked the map file and the position was ok. Maybe the problem was that I programmed 32 bit when the readout protection is 16 bit only, so I filled other 16 bit not related to this matter. I agree with you, Keil Ulink is very bad (the worst one?) for small production programmer. Thanks for your help, L