Skip to content

Commit 1c38d24

Browse files
author
Cruz Monrreal
authored
Merge pull request #7586 from adustm/qspistm_fix_arm_toolchain
Add reset internal state before call to HAL_QspiInit function
2 parents 488baf9 + 5821e6c commit 1c38d24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

targets/TARGET_STM/qspi_api.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ qspi_status_t qspi_init(qspi_t *obj, PinName io0, PinName io1, PinName io2, PinN
140140
__HAL_RCC_QSPI_FORCE_RESET();
141141
__HAL_RCC_QSPI_RELEASE_RESET();
142142

143+
// Reset handle internal state
144+
obj->handle.State = HAL_QSPI_STATE_RESET;
145+
obj->handle.Lock = HAL_UNLOCKED;
146+
143147
// Set default QSPI handle values
144148
obj->handle.Init.ClockPrescaler = 1;
145149
obj->handle.Init.FifoThreshold = 1;

0 commit comments

Comments
 (0)