Author Topic: Need Lattice FPGA to send interrupts to linux OS on Beaglebone  (Read 897 times)

0 Members and 1 Guest are viewing this topic.

Offline Brown123Topic starter

  • Newbie
  • Posts: 1
  • Country: us
Need Lattice FPGA to send interrupts to linux OS on Beaglebone
« on: February 21, 2019, 11:18:06 pm »
I have the BeagleWire FPGA cape for the BeagleBone Black and I want to send interrupts from the FPGA to the linux os on the BeagleBone every time a switch is pressed on the cape . The BeagleWire consists of the Lattice iCE40HX4K FPGA. I understand this is done through GPIO and that an interrupt request line has to be set up between the two but need an explanation as to the steps that I need to take to go about setting up this in Verilog. I'm fairly new to FPGAs, just starting out, so any help/tips would be appreciated. Details regarding the BeagleWire including its open source software, can be found below:

https://www.crowdsupply.com/qwerty-embedded-design/beaglewire

https://github.com/pmezydlo/BeagleWire
 

Offline blacksheeplogic

  • Frequent Contributor
  • **
  • Posts: 532
  • Country: nz
Re: Need Lattice FPGA to send interrupts to linux OS on Beaglebone
« Reply #1 on: February 23, 2019, 02:31:35 am »

You will need to look at an example provided with your kit as it depends on the tool set. I don't use the same tool chain so I can comment on the specifics within the tools you are using (I use Quartus & Platform Designed), but at a basic process level in Platform Designer it just a matter enabling IRQ's, setting the type of IRQ on the port, and connecting it to the HPS IRQ.

You need to take a look at the examples that came with your board because it's non-trivial to implement the bridge by hand so use the tool and the verilog will be generated by the tool.

However, you then need to create a device tree and then write the device driver which requires being able to build the kernel and use DTC. If you are using the Linux OS provided with the board it's probably something like BusyBox so you either need to use a cross compiler on an Windows/Linux box or build a new kernel and rootfs for the board you are using with the development tools (I built a Debian LTS distro for the board I'm using). If you build your own kernel/rootfs or use a Linux Workstation you don't need the EDS or the ARM tool chain. I find it's much easier to use a Linux Kernel running on a Workstation for development because the windows tools don't work out of the box (my experience).

In summary, if you are new to this, you really need to work though the examples provided. It's not a trivial walk though someone can write up in a couple of minutes on a forum.

Probably not the response you wanted I know, but there's no short cuts if you have not done this before. Work though the examples that came with your board.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf