Added lock state check to stlink_erase_flash_page.
authorIan Griffiths <6thimage@gmail.com>
Wed, 20 Mar 2013 13:01:49 +0000 (13:01 +0000)
committerIan Griffiths <6thimage@gmail.com>
Wed, 20 Mar 2013 13:01:49 +0000 (13:01 +0000)
commit69fecdca633e72547e90245d327d5d92c0488be8
treeb3006b22be002a6fc3f5c8af388f49ec925e3907
parent5be889e3feb75fc7f594012c4855b4dc16940050
Added lock state check to stlink_erase_flash_page.

On the STM32L152 processor, the erase fails for the first page as the
lock is already disabled (with the unlocking code causing the lock to
become re-enabled). This commit adds checking of the lock state and will
only unlock if necessary.
src/stlink-common.c