This commit is contained in:
Jisu Yu 2023-10-11 03:51:28 +02:00 committed by GitHub
commit 68892cb15c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -215,7 +215,10 @@ HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FSMC_NORSRAM_TimingTy
__FSMC_NORSRAM_ENABLE(hsram->Instance, hsram->Init.NSBank);
/* Initialize the SRAM controller state */
hsram->State = HAL_SRAM_STATE_READY;
if (hsram->Init.WriteOperation == FSMC_WRITE_OPERATION_DISABLE)
hsram->State = HAL_SRAM_STATE_PROTECTED;
else
hsram->State = HAL_SRAM_STATE_READY;
return HAL_OK;
}