I am using single SPI port for FRAM & Flash. While using SPI in main if interrupt occurs & if interrupt uses same SPI port for read/write FRAM or FLASH collision occurs.
Please suggest the solution to solve this problem.
This is basically a matter of your application design. If you require SPI to be used from both program domains, then the specific interrupt, that does SPI IO has to be disabled during an atomic SPI access, or the SPI action in interrupt has to be delayed (e. g. according to a metaphore respectively a flag) during the main program SPI access and rescheduled afterwards.
It's an everyday programming problem, to my opinion.