- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to create an application which starts a SPI DMA transfer of 200 bytes every time there is a positive edge on one of the GPIO pins. Right now, I am polling the pin using CyU3PGpioGetValue and starting the DMA transfer on the positive edge by calling CyU3PSpiSetBlockXfer. However, this does not provide the speed that I need for my application, and the RTOS thread manager interrupting the execution of my application thread occasionally causes the application to miss the edge. I tried configuring a GPIO interrupt handler using the Api provided in cyu3gpio.h, but was unable to get CyU3PSpiSetBlockXfer to run inside of the ISR, as it seems like some API calls cannot be called within an interrupt handler. Is there any way to directly set the DMA controller to read SPI data in on an interrupt, or to allow for running a SPI transfer inside an ISR?
Thank you for any insight.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes that's correct api has many checks to do before toggling the GPIO pin. These checks took time but they are necessary for correct operation. If you are sure that you are toggling the right GPIO pin then go ahead and use register access.
-Regards
Abhinav