STM32H74ZI write and read s29gl064s incorrect still!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
l0p0c
Level 1
Level 1
First question asked Welcome!

Stm32h743 is connected via FMC s29gl064s,and cubeide configed. As shown below:

l0p0c_0-1641532466718.png

 

RCC configured as below:

l0p0c_1-1641532504255.png

Read flash ID:

sts = HAL_NOR_Read_ID(&hnor1, &id);
printf("sts1 = %d\n", sts);

printf("nor_id = %04x %04x %04x %04x\n",
id.Manufacturer_Code,
id.Device_Code1,
id.Device_Code2,
id.Device_Code3);
HAL_Delay(1);

Return:nor_id = 0001 227e 2213 2201

 

Then ReturnToReadMode:
sts = HAL_NOR_ReturnToReadMode(&hnor1);
printf("stsreadmode2 = %d\n", sts);
HAL_Delay(1);

EraseChip:

sts = HAL_NOR_Erase_Block(&hnor1, 0, 0x60000000);
printf("sts_erase_block = %d\n", sts);

do {
sts = HAL_NOR_GetStatus(&hnor1, 0x60000000, 500);
printf("HAL_NOR_GetStatus1 = %d\n", sts);
} while(sts);

Return status look like correct.

 

Write operation:

uint16_t txbuf[1024] = {0}, rxbuf[1024] = {0};
#if 1
for (i = 0; i < 1024; i++) {
txbuf[i] = 0x5a;
}
#endif
sts = HAL_NOR_ProgramBuffer(&hnor1, 0, txbuf, 256);
printf("sts_write_buf = %d\n", sts);

do {
sts = HAL_NOR_GetStatus(&hnor1, 0x60000000, 500);
printf("HAL_NOR_GetStatus1 = %d\n", sts);
} while(sts);

Return status look like correct.

 

Read operation:

sts = HAL_NOR_ReadBuffer(&hnor1, 0, rxbuf, 256);
printf("sts_read_buf = %d\n", sts);
#if 1
do {
sts = HAL_NOR_GetStatus(&hnor1, 0x60000000, 500);
printf("HAL_NOR_GetStatus1 = %d\n", sts);
} while(sts);
#endif
for (i = 0; i < 256; i++) {
if (!(i % 8)) {
printf("\n");
}
printf("%04X ", rxbuf[i]);
}
printf("\n");

Return resaults as below:

l0p0c_2-1641532655582.png

 According to your tips, I added the HAL_NOR_ReturnToReadMode function.

But the result is still incorrect! Please help me look again. What's the problem。

Thanks.

 

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

Hello,

We are still awaiting for your waveform screen captures as previously requested.   What is the full Ordering Part Number (OPN) of the S29GL064S (which model is being used)?   Is the BYTE# pin being used (x8 or x16 mode)?  Is the WP# pulled logic high?

The "Connecting FLASH to System Address Bus" application is attached for your review and reference.

 

Best regards,

Albert

Cypress Semiconductor Corp.

An Infineon Technologies Company 

An Infineon Technologies Company

View solution in original post

0 Likes
3 Replies
AlbertB_56
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hello,

Please provide waveform captures during erase and write operations.  Please include all input control signals (CE#, WE#, OE#, WP#, BYTE#, VI/O, RESET#) and label them clearly for analysis.

Thank you in advance...

 

Best regards,

Albert

Cypress Semiconductor Corp.

An Infineon Technologies Company

0 Likes
lock attach
Attachments are accessible only for community members.

Hello,

We are still awaiting for your waveform screen captures as previously requested.   What is the full Ordering Part Number (OPN) of the S29GL064S (which model is being used)?   Is the BYTE# pin being used (x8 or x16 mode)?  Is the WP# pulled logic high?

The "Connecting FLASH to System Address Bus" application is attached for your review and reference.

 

Best regards,

Albert

Cypress Semiconductor Corp.

An Infineon Technologies Company 

An Infineon Technologies Company

0 Likes
lock attach
Attachments are accessible only for community members.
AlbertB_56
Moderator
Moderator
Moderator
500 replies posted 50 likes received 250 replies posted

Hello,

We are still awaiting for your waveform screen captures as previously requested.   What is the full Ordering Part Number (OPN) of the S29GL064S (which model is being used)?   Is the BYTE# pin being used (x8 or x16 mode)?  Is the WP# pulled logic high?

The "Connecting FLASH to System Address Bus" application is attached for your review and reference.

 

Best regards,

Albert

Cypress Semiconductor Corp.

An Infineon Technologies Company

0 Likes