January 3, 2022

Orange Pi 4 (Rockchip 3399) generate an interrupt

The idea here is to get any kind of an interrupt working. What I will probably do is try to get an interrupt from the console uart working, so when I type a character I get an interrupt. I will note that software interrupts are also possible, i.e. you can write to a register and generate a "simulated interrupt".

Once this is working, the next project will be to get a timer working to generate periodic interrupts. At that point the stage will be well set to start integrating support for the RK3399 into my Kyu operating system.

The RK3399 uses the GIC500. I have previously worked with the GIC400 (within the Fire3 project with the Samsung s5p6818, and I hope that some or much of this code will also work with the GIC500. We shall see.

Code cleanup

I begin this little project, as usual, by copying all the files from my previous printf project. Then I do a bit of housekeeping. I split out the gpio code into gpio.c so that main.c is just general top level code. While I am at it I generate a file protos.h that contains prototypes for various shared functions. I do not put my header files in some separate directory as some imbeciles like to do.
Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org