Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Handling single SPI in main routine and interrupt

Status
Not open for further replies.

smartshashi

Member level 4
Joined
Aug 11, 2004
Messages
68
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
513
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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top