stlink: check buffer size on 16 and 32 bit memory transfer
commitfd0b4dd15ff7217f3c70818c7fd2f0a5b88de89a
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 25 Jul 2021 15:51:49 +0000 (25 17:51 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Fri, 5 Nov 2021 22:40:54 +0000 (5 22:40 +0000)
tree9597ecb1266989265119af69139eec4d3d2409b9
parent7901cf2124fbaffa85d589b67c580d6ad2e9beb6
stlink: check buffer size on 16 and 32 bit memory transfer

Both HLA and ADIv5 layers limit the memory transfer within blocks
whose boundaries are aligned at 1024 or 4096 bytes.
New stlink firmware handle the ADIv5 TAR autoincrement, making
possible to send memory transfers across the boundary of 1024 or
4096 byte. OpenOCD doesn't use this feature yet.

Use the correct buffer size in the code, even if it is not used.
While there, split SWIM buffer size from JTAG/SWD case; stlink has
a dedicated command to retrieve SWIM buffer size, but currently
not implemented in OpenOCD.

Change-Id: Id46c0356ef21cead08726c044a1cd9725fd4f923
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6600
Tested-by: jenkins
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
src/jtag/drivers/stlink_usb.c