STMicroelectronics / stm32-external-loader

Provides drivers, examples, loader files and testing routines for external loaders for STM32 series of microcontrollers.
Other
127 stars 71 forks source link

Bug reading the ID from the External Flash MX25LM51245G in STM32H735G-DK Eval kit board #21

Open urrudelu30 opened 7 months ago

urrudelu30 commented 7 months ago

Hi, I am taking the source code from trying to read the ID from the External Flash, but I am having some problems, note very sure if there is maybe with the clock config.

The initialization of the OCTOSPI device seems correct: int32_t result=0; uint8_t ID; memset(&ID,0,sizeof(ID)); Flash.InterfaceMode = BSP_OSPI_NOR_OPI_MODE; Flash.TransferRate = BSP_OSPI_NOR_DTR_TRANSFER; /Initialaize OSPI/ if(BSP_OSPI_NOR_Init(0,&Flash) !=0) { return 0; } /Configure the OSPI in memory-mapped mode*/ //result = BSP_OSPI_NOR_EnableMemoryMappedMode(0); result = BSP_OSPI_NOR_ReadID(0, &ID);

When I reached the line "result = BSP_OSPI_NOR_ReadID(0, &ID);" the returned ID is 0x85c2c2 and it must be 0x3a85c2, seems like there is a problem in one byte.

image

any help?

Thanks, Aitor