]> git.sur5r.net Git - openocd/commit
psoc6: Run flash algorithm asynchronously to improve performance
authorBohdan Tymkiv <bhdt@cypress.com>
Wed, 21 Mar 2018 14:13:28 +0000 (16:13 +0200)
committerTomas Vanek <vanekt@fbl.cz>
Mon, 23 Apr 2018 19:42:06 +0000 (20:42 +0100)
commit4440bf1fcddce3501781496e2d6a9d0f12cba08d
tree039a7761db71f826875953dc7ce5e09d5ddb1385
parentb941e2e727387c6c8880990b829a48b289dfc90b
psoc6: Run flash algorithm asynchronously to improve performance

Existing psoc6 driver starts flash algorithm for each Flash row. This is
suboptimal from performance point of view, starting/stopping flash
algorithm for each row adds significant overhead. This change starts
flash algorithm and leaves it running asynchronously while driver
performs flash operations.

Performance gain is 170...250% depending on probe:

flash write_image img_256k.bin    | w/o this change | with this change |
----------------------------------|-----------------|------------------|
KitProg2/CMSIS-DAP, SWD @ 1 MHz   |     4 KiB/s     |     10 KiB/s     |
J-Link Ultra, SWD @ 1 MHz         |    17 KiB/s     |     31 KiB/s     |
J-Link Ultra, SWD @ 4 MHz         |    33 KiB/s     |     57 KiB/s     |

Change-Id: I5bd582584b35af67600c4d197829eb7aeeec7e3f
Signed-off-by: Bohdan Tymkiv <bhdt@cypress.com>
Reviewed-on: http://openocd.zylin.com/4472
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
src/flash/nor/psoc6.c
tcl/target/psoc6.cfg