kinetis: Fixed the flash write command generation for K64 devices

This commit is contained in:
dragonmux 2022-06-22 00:23:13 -04:00
parent 0f1006bf08
commit 0dffd2ffd2
No known key found for this signature in database
GPG Key ID: 64861EA89B35507A

View File

@ -466,7 +466,7 @@ static int kinetis_flash_cmd_write(struct target_flash *f, target_addr dest, con
write_cmd = FTFx_CMD_PROGRAM_LONGWORD;
while (len) {
if (kinetis_fccob_cmd(f->t, write_cmd, dest, src, 1)) {
if (kinetis_fccob_cmd(f->t, write_cmd, dest, src, kf->write_len >> 2U)) {
if (len > kf->write_len)
len -= kf->write_len;
else