2021-07-08 06:02 AM
Hello all.
I use STM32F4 controller with eMMC external Flash.
I use two IDEs:
The access to eMMC external Flash succeeds while I use IAR IDE.
The access to eMMC external Flash failed while I use STMCubeIDE with same SDIO clock of IAR .
I divide by 2 the SDIO clock for STMCubeIDE.
The access to eMMC external Flash is better but failed after 10-20 accesses.
Can anyone advise what is the problem of STMCubeIDE compiler/linker/optimizer?
Thanks in advance.
Yacob.
Solved! Go to Solution.
2021-08-26 01:59 AM
Hello all,
The failure was the external Flash stuck and did not response.
I solved the failure by compiling in Release configuration with the following levels:
Yacob Hassidim.
2021-07-13 02:37 AM
Hi @Community member ,
Could you please precise if you are referring to a Cube example? If yes, which one?
Otherwise, please share the code allowing to reproduce the issue?
Thanks.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2021-07-14 09:59 PM
Hello @Amel NASRI ,
Thank you for your reply.
I have not Cube example.
The code is calling to the following ST HAL functions:
HAL_StatusTypeDef halStatus;
MMC_HandleTypeDef* mHalMmc;
uint8_t* pBuffer;
uint32_t blockAdd;
uint32_t numberOfBlocks;
uint32_t timeout;
/*Read Block Operation*/
halStatus = HAL_MMC_ReadBlocks(
mHalMmc,
pBuffer,
blockAdd,
numberOfBlocks,
timeout);
while(HAL_MMC_GetState(mHalMmc)!=HAL_MMC_STATE_READY);
/*Write Block Operation*/
halStatus = HAL_MMC_WriteBlocks(
mHalMmc,
pBuffer,
blockAdd,
numberOfBlocks,
timeout);
while(HAL_MMC_GetState(mHalMmc)!=HAL_MMC_STATE_READY);
Another issue that I forgot to mention: I use FreeRTOS.
I remind again:
The ST HAL functions succeed under IAR always but under CubeIDE most of the times they failed.
Thanks in advance for your advise.
Yacob Hassidim.
2021-08-26 01:59 AM
Hello all,
The failure was the external Flash stuck and did not response.
I solved the failure by compiling in Release configuration with the following levels:
Yacob Hassidim.
2021-08-26 02:31 AM
Hi @Community member ,
Thanks a lot for coming to share the solution you found.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.