- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Every one,
I want to transfer data via SPI (Slave) using interrupt. I found one example and tries to implement it. But its not doing things as its suppose to do in my program. I am attaching my project please have a look into it and suggest me with possible solutions.
Looking forward for your reply.
Regards
Awais
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest you to create a project with an SPI master and an SPI slave. Connect both and simulate a communication.
Keep in mind that for every bit (Byte) the master sends out via mosi, immediately a bit (Byte) is sent back from th slave via miso.
Do not clear the buffers using SPIS_ClearRxBuffer() when you read out the data, do that only in case of errors.
You do not have an interrupt handler, the StartEx() is commented out.
You did not start the Slave.
Easiest approach: increase the buffers to something like 150 and let the component handle the interrupts.
read off all incoming bytes from buffer and provide answers in the output buffer.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest you to create a project with an SPI master and an SPI slave. Connect both and simulate a communication.
Keep in mind that for every bit (Byte) the master sends out via mosi, immediately a bit (Byte) is sent back from th slave via miso.
Do not clear the buffers using SPIS_ClearRxBuffer() when you read out the data, do that only in case of errors.
You do not have an interrupt handler, the StartEx() is commented out.
You did not start the Slave.
Easiest approach: increase the buffers to something like 150 and let the component handle the interrupts.
read off all incoming bytes from buffer and provide answers in the output buffer.
Bob