How to use FMC in main while loop and interruption at the same time correctly?
Hello everyone. I am using STM32H743IIT with a sensor and two external SRAMs. The sensor is connected to the STM32H743x by SPI5 and EXIT2. The external SRAMs are connected to the STM32H743x by FMC.
The sensor triggers the EXIT2 and in the interrupt function data will be received by SPI and saved to the first external SRAM in sequence.
In the main while loop, every 20ms(counted by the number of data point), the data in the first external SRAM will be replicated to the second SRAM in sequence. Then a comparation of the data between the source and the destination will run to check.
The check result is that some data are different which means something wrong in the replication progress if the external interruption is enabled during the replication and the comparation. But if the external interruption is disabled during the replication and the comparation the check result is that all the data are the same between the source and the destination.
I want to know how to solve the problem so that I can save the data from the sensor continuously and also using the data saved in the external SRAMs correctly.
Thanks a lot.
