]> git.sur5r.net Git - openocd/commit
flash/nor/stm32: Report errors in wait_status_busy
authorChristopher Head <chead@zaber.com>
Mon, 14 May 2018 18:56:56 +0000 (11:56 -0700)
committerTomas Vanek <vanekt@fbl.cz>
Tue, 3 Jul 2018 06:47:14 +0000 (07:47 +0100)
commit47d0930410bc6f9fdf1d59a60a60fcca4c7bb1d4
tree7fab8cf2d7fc2c447aa95ed68b4cc921b63fbc60
parent541dcc2487d11fbf0f14707217c616847a7b635d
flash/nor/stm32: Report errors in wait_status_busy

Flash operation errors that occur during algorithm programming are
reported via the algorithm return value. However, Flash operation
errors that occur during non-algorithm work (erasing, programming
without a work area, programming the last non-multiple-of-32-bytes on
an H7, etc.) generally end with a call to stm32x_wait_status_busy,
which reads the status register and clears the error flags but fails
to actually report that something went wrong should an error flag
(other than WRPERR) be set. Return an error status from
stm32x_wait_status_busy in those cases. Correct a log message
accordingly.

Change-Id: I09369ea5f924fe58833aec1f45e52320ab4aaf43
Signed-off-by: Christopher Head <chead@zaber.com>
Reviewed-on: http://openocd.zylin.com/4519
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/stm32f2x.c
src/flash/nor/stm32h7x.c
src/flash/nor/stm32l4x.c