2021-12-15 12:06 AM
H723ZGT6 Nucleo-144
CubeMX 6.3.0
[ data sheet ]
H723: DS13313 Rev2
[NOR Flash]
S25FL256L
[Reference manual]
H723: RM0488 Rev2
S25FL256L: 002-00124 Rev. * H
I am currently using H723 to create a project to read and write NORFLASH.
However, the read / write is not successful.
I want to read and write with H723 as the master and external flash as the slave.
1. Is the CubeMX setting incorrect?
2. Is there a problem with the idea of SPI communication?
I searched, but couldn't find much reference sample code that could be used to read and write the external flash.
Please let me know if there is any sample code or site that you can refer to.
Solved! Go to Solution.
2022-01-05 02:00 AM
Sorry for my late reply.
The STCubeMX settings were certainly correct.
Apparently the command was sent incorrectly.
I fixed the code and it worked.
2021-12-15 02:53 AM
Hi @june ,
Thanks for your feedback,
Seems that your SPI configuration in CubeMX is correct. I believe that your issue comes from the part of the SPI communication in your code, I am adding our colleague to the loop to check with us this issue.
@Imen DAHMEN could you please review this issue and help @june resolving it.
Also, you can refer to the example selector in CubeMX, there are several SPI examples there that might help you (Please see the attachment).
Regards,
Sara.
2021-12-15 06:10 AM
GPIO_PIN_SET is a high level while GPIO_PIN_RESET is a low level. You have them backwards.
Edit: Unless NORFLASH is backwards for this line? I guess it's possible. But in that case, the comments don't match the code.
2021-12-15 06:16 AM
Hello @june ,
I advise you to use OctoSPI to read and write the external flash.
For that, you can refer to the OSPI_NOR_ReadWrite_DMA example within STM32CubeH7 MCU package.
Please have a look at these resources in order to get more details about OctoSPI features and usage:
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
Imen
2022-01-05 01:32 AM
Thank you for your advice.
I made a mistake.
The comment was correct and the code was incorrect.
2022-01-05 02:00 AM
Sorry for my late reply.
The STCubeMX settings were certainly correct.
Apparently the command was sent incorrectly.
I fixed the code and it worked.
2022-01-05 02:04 AM
Sorry for late reply.
I also considered OctoSPI, but decided to communicate with SPI.
The code I wrote was incorrect and couldn't be read or written.
It was very helpful. Thank you
2022-01-05 02:29 AM
Hi @june ,
Really glad to know you overcame this problem, and thank you for the update you provided.
Thanks
Imen