cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745 write to S29GL256S NOR flash - FMC

VZolt.1
Associate II

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,

0693W00000AOxIqQAL.png 

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.

0693W00000AOx7OQAT.png0693W00000AOx7EQAT.png

3 REPLIES 3

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
VZolt.1
Associate II

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

0693W00000APojVQAT.png 

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?

VZolt.1
Associate II

Seems like first sector of the flash is locked. Writing works now starting from second sector.