Skip to content

Commit 671c2fb

Browse files
author
Matthew Macovsky
committed
Fix STM AlternateByteSize calculation
05899e9 introduces a shift of by QUADSPI_CCR_ABSIZE_POS for AddressSize and AlternateBytesSize. But for AlternateBytesSize the old code that set it directly from command->alt.size was left in place, causing the new shifted value to be ignored.
1 parent 22de273 commit 671c2fb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

targets/TARGET_STM/qspi_api.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ void qspi_prepare_command(const qspi_command_t *command, QSPI_CommandTypeDef *st
252252
st_command->AlternateBytes = command->alt.value;
253253
/* command->AlternateBytesSize needs to be shifted by QUADSPI_CCR_ABSIZE_Pos */
254254
st_command->AlternateBytesSize = (command->alt.size << QUADSPI_CCR_ABSIZE_Pos) & QUADSPI_CCR_ABSIZE_Msk;
255-
st_command->AlternateBytesSize = command->alt.size;
256255
}
257256

258257
switch (command->data.bus_width) {

0 commit comments

Comments
 (0)