Help with SPI and Interrupt code for beaglebone black.

Hi everyone.

I’m working with BeagleBone Black right now and I’m having troubles with interrupt and SPI code.
Mainly, I’m programming the beagle without device tree or sysf, or something like that, I’m doing it across
memory mapping and using registers so, I don’t know how to program an interrupt for the beagle, I mean,
I know the registers involved because I almost remember the Sitara Cortex A8 datasheet completly hahaha, but I don’t know
how to do it in code. Any idea or example?

Secondly, I want to work with SPI but in reception mode I want to do it with an interrupt so, I can’t continue, and
I can’t find information on internet about doing without dtb or any pre-programmed system.

Thank you very much!!
and sorry for my english.

Hi everyone.

I’m working with BeagleBone Black right now and I’m having troubles with interrupt and SPI code.
Mainly, I’m programming the beagle without device tree or sysf, or something like that, I’m doing it across
memory mapping and using registers so, I don’t know how to program an interrupt for the beagle, I mean,
I know the registers involved because I almost remember the Sitara Cortex A8 datasheet completly hahaha, but I don’t know
how to do it in code. Any idea or example?

OK, so if you are using memory mapping, you are running your code from user space which means you cannot intercept interrupts. If you want to to use interrupts, you have to write a kernel module or device driver. For examples on how to do this, look at /drivers/iio folder in the Linux Kernel source code. You will find several SPI based drivers that use interrupts.

Regards,
John