Fix Instruction with no data command

Adding QSPI_DATA_NONE activates the transfer
of the command inside HAL_QSPI_COMMAND function
pull/7783/head
adustm 2018-03-22 18:26:39 +01:00 committed by Maciej Bocianski
parent 05899e9c70
commit 8e08740237
1 changed files with 1 additions and 0 deletions

View File

@ -262,6 +262,7 @@ qspi_status_t qspi_command_transfer(qspi_t *obj, const qspi_command_t *command,
qspi_prepare_command(command, &st_command); qspi_prepare_command(command, &st_command);
st_command.NbData = 1; st_command.NbData = 1;
st_command.DataMode = QSPI_DATA_NONE; /* Instruction only */
if (HAL_QSPI_Command(&obj->handle, &st_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) { if (HAL_QSPI_Command(&obj->handle, &st_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE) != HAL_OK) {
status = QSPI_STATUS_ERROR; status = QSPI_STATUS_ERROR;
return status; return status;