Announcements
IMPORTANT: Cypress Developer Community currently doesn’t allow sign-in to prepare for the upcoming transition. To learn more, check out our announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

Anonymous
Not applicable

 hi,

   

    I am Nagarajan.K , new to This CX3 ,Actually I want know How to use Gpio Interrupts in cx3,My exact application is controlling Camera Sensor Parameter With No of GPIO Keys with Help Of Interrupt, Thansk In Advance. 

   

 

   

Regards,

   

Nagarajan.K 

0 Likes
2 Replies
Anonymous
Not applicable

 GPIO interrupts in CX3 work exactly the same way as in FX3.

   

 

   

Basically, you configure the GPIO using CyU3PGpioSetSimpleConfig where you can set the interrupt mode. Then, your GPIO interrupt callback that you registered via CyU3PGpioInit or CyU3PRegisterGpioCallBack will be called when FX3/CX3 sees that specific interrupt in that pin.

   

 

   

Inside the GPIO interrupt callback (of type CyU3PGpioIntrCb_t), the GPIO that actually saw the interrupt will be passed as the argument. Filter this out and do whatever you like. But note that this interrupt call is made in interrupt context, which means that any blocking API calls cannot be made from this callback.

   

 

   

You should do as little computation as possible and then exit the callback quickly.

0 Likes
Anonymous
Not applicable

Thanks for the explanation. GPIO interrupt is working fine......

0 Likes