Jump to content

Fast interrupt handling in AllWinner H3 using Linux Kernel Module


indianajones

Recommended Posts

I'm writing a wiegand protocol handler in a Linux Kernel Module for the NanoPi NEO (AllWinner H3).  I have the code working, meaning the interrupt handlers for the D0 and D1 pins do in fact get called when I swipe a prox card.  However, I'm missing usually about half or more of the 26 bits.  The wiegand protocol is 26 pulses, each pulse 50uS wide, and separated by 2000us, so yeah it has to be fast.  I've set the debounce value to zero using gpio_set_debounce(), so it's running as quickly as I can make it without patching Linux source.

 

After doing some reading, I think I need to modify the device tree to make the default polling speed for GPIOA pins faster.  Or maybe I need to make the debounce values shorter, not sure which.  But this is the first time I will have messed with the device tree,  and I could use some pointers on the H3 device tree.  Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines