SPI master intrrupt

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

cross mob
lock attach
Attachments are accessible only for community members.
Tim_Shih
Level 5
Level 5
250 sign-ins 50 replies posted 50 questions asked

Dear Receive, 

In SPI communication, 

# if MCU is a SPI master, SPI master transmits data to SPI slave and then SPI slave replied at the same time.

# I mean SPI master must transmit data first and SPI slave replied. SPI slave will not transmit data first to SPI slave.

I feel a little confuse about  in what situation SPI master needs interrupt ?! 

Thank you so much.

0 Likes
1 Solution
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Tim,

SPI does not require interrupts to operate.

You can use polling which has the CPU wait for each SPI transaction.   

However, more CPU-efficient method would be interrupts.  This reduces the load on the CPU.

Interrupts are used if you need to operate the SPI at maximum speed.  Otherwise, polling should be sufficient.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

2 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Tim,

SPI does not require interrupts to operate.

You can use polling which has the CPU wait for each SPI transaction.   

However, more CPU-efficient method would be interrupts.  This reduces the load on the CPU.

Interrupts are used if you need to operate the SPI at maximum speed.  Otherwise, polling should be sufficient.

Len
"Engineering is an Art. The Art of Compromise."

thank you

0 Likes