2021-05-19 08:35 AM
Hi all,
the issue is about a custom board with an STM32H45 and an S29GL256S paralel NOR flash
After FMC is initialized by the CM7 core as in the attached files, i am able to read the NOR flash ID,
but writing data to the IC does not work, memory browser shows only 0xFF, and when reading back, i get the same - only 0xFF.
I need to mention that the WE line was moved from the PH5 to PD5, and placed a pullup resistor to the RY/BY line.
Anybody could help? Further data could be provided when needed for the analysis.
2021-05-19 08:50 AM
No actual meat here, just pin init and top level code.
You're going to need to look more deeply into the command level interaction.
The Read ID working is promising as it suggests the init code works and the pins are ok. Try reading the entire CFI, checking the device specific stuff (on several boards if you have them)
I'd use a NOT BUFFERABLE / NOT SHAREABLE attributes for Write-Thru on the NOR
Remember the NOR chip doesn't understand the STM32's address space, the chip has zero based addressing.
https://www.cypress.com/file/177976/download
2021-05-26 12:56 AM
Hi, thanks for the reply
To simplfy i commented the MPU function.
I did some more digging and collected the waveforms for each functions that are executed:
HAL_NOR_Read_ID(&hnor1, &norID);
memory browser shows like in screenshot after reading the ID
HAL_NOR_ReturnToReadMode(&hnor1);
HAL_NOR_Erase_Chip(&hnor1, NOR_BANK_ADDR);
HAL_NOR_Erase_Block(&hnor1, WRITE_READ_ADDR, NOR_BANK_ADDR);
uint16_t var=0x1234;
HAL_NOR_Program(&hnor1, (uint32_t *)(NOR_BANK_ADDR + WRITE_READ_ADDR), &var);
HAL_NOR_ReadBuffer(&hnor1, NOR_BANK_ADDR + WRITE_READ_ADDR, &aRxBuffer[0], 1);
Do you notice something unusual on the waveforms? What could be the root cause that data is not written?
2021-05-28 12:57 AM
Seems like first sector of the flash is locked. Writing works now starting from second sector.