SPI Interrupt

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

cross mob
Anonymous
Not applicable

What are the SPI internal interrupt in psoc5lp ? Does the internal interrupt mean those status reflected on status register?if not then where can i find details about internal interrupt? Does the predefined Tx and Rx interrupr are those which is visible in configure tab?

   

Thank you.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The internal interrupt handles sending and receiving from the internal buffer which size you specified. Internal interrupts do not work together with the Rx and Tx interrupts, you have to choose one internal or external. Yes, the rx and tx_interrupt are the signal to which you may connect an isr component to.

   

Easiest setup: Set both buffers large, 2 to 5 times your normal message size. Do not spend time between sending single bytes, or the ss line may go high. Check for transmission completed by checking GetRxBufferSize() for the expected value.

   

 

   

Bob

View solution in original post

0 Likes
7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The internal interrupt handles sending and receiving from the internal buffer which size you specified. Internal interrupts do not work together with the Rx and Tx interrupts, you have to choose one internal or external. Yes, the rx and tx_interrupt are the signal to which you may connect an isr component to.

   

Easiest setup: Set both buffers large, 2 to 5 times your normal message size. Do not spend time between sending single bytes, or the ss line may go high. Check for transmission completed by checking GetRxBufferSize() for the expected value.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

thanks bob.

   

One more thing is if i write command say SPIM_WriteTxData(data); and let data be defined like uint8 data=5;

   

then Is the ascii value of 5 will be sent over SPI channel?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Of course not! the value will be 0x05. When you want to send an ascii 5 you must set data to 0x35

   

Another choice will be to use sprintf() to convert to ascii and send the resulting string over your interface.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

oh.. thank you.

   

How to correct this error?

   

Build error: 'SPIS_STS_SPI_DONE' undeclared (first use in this function)

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Use the master constant, not the slave: SPIM_STS_SPI_DONE (just a guess)

   

 

   

Bob

0 Likes
Anonymous
Not applicable

i want psoc as slave

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Then check, if your component name is "SPIS" and not "SPIS_1"

   

 

   

Bob

0 Likes