[opensuse-arm] Custom Raspberry PI3 kernel modules
I am looking at making a custom Raspberry PI3 kernel module that needs to deal with the various I/O pins. I need a driver because the activity is quite high. So a python or other high-level interface will not be possible. It will most likely do the majority of work in the driver's interrupt routine that, I hope, can be called when a pin or pins change state. My questions are: 1. Has anyone experienced any difficulties with making custom drivers on openSUSE running on the Pi3? 2. Are there any drivers that are being loaded by openSUSE that fiddle with the I/O lines that I may need to disable? Currently, nothing is connected to the I/O lines. 3. Any suggestions of a good driver to perhaps look at for this kind of I/O interface? -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
Hi Roger, On 22/06/17 10:38, Roger Oberholtzer wrote:
I am looking at making a custom Raspberry PI3 kernel module that needs to deal with the various I/O pins. I need a driver because the activity is quite high. So a python or other high-level interface will not be possible. It will most likely do the majority of work in the driver's interrupt routine that, I hope, can be called when a pin or pins change state.
My questions are: 1. Has anyone experienced any difficulties with making custom drivers on openSUSE running on the Pi3? 2. Are there any drivers that are being loaded by openSUSE that fiddle with the I/O lines that I may need to disable? Currently, nothing is connected to the I/O lines.
Which pins are we talking about? Which interface do you want to use (SPI, I2C etc)? Which sensor do you want to connect? Which version of openSUSE do you use? Regards, Matthias
3. Any suggestions of a good driver to perhaps look at for this kind of I/O interface?
I -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Thu, Jun 22, 2017 at 12:24 PM, Matthias Brugger <mbrugger@suse.com> wrote:
Hi Roger,
On 22/06/17 10:38, Roger Oberholtzer wrote:
I am looking at making a custom Raspberry PI3 kernel module that needs to deal with the various I/O pins. I need a driver because the activity is quite high. So a python or other high-level interface will not be possible. It will most likely do the majority of work in the driver's interrupt routine that, I hope, can be called when a pin or pins change state.
My questions are: 1. Has anyone experienced any difficulties with making custom drivers on openSUSE running on the Pi3? 2. Are there any drivers that are being loaded by openSUSE that fiddle with the I/O lines that I may need to disable? Currently, nothing is connected to the I/O lines.
Which pins are we talking about?
That's flexible. We can connect to any pins that are best suited.
Which interface do you want to use (SPI, I2C etc)?
It is not a standard interface. Just a trigger pin. But it can trigger up to 32 kHz. And we need to react to each of them. We would like to try to stay away from commonly used lines so we could possibly also attach a device that uses such a protocol. But that is a secondary concern.
Which sensor do you want to connect?
It is a device that provides pulses related to movement. We monitor these and take action on them. Some actions are the manipulation of other lines. Some are information packets (UDP) to interested clients (at a much reduced rate).
Which version of openSUSE do you use?
Tumbleweed. That is flexible. We use Tumbleweed because that is the one that installed. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On 26.06.17 08:14, Roger Oberholtzer wrote:
On Thu, Jun 22, 2017 at 12:24 PM, Matthias Brugger <mbrugger@suse.com> wrote:
Hi Roger,
On 22/06/17 10:38, Roger Oberholtzer wrote:
I am looking at making a custom Raspberry PI3 kernel module that needs to deal with the various I/O pins. I need a driver because the activity is quite high. So a python or other high-level interface will not be possible. It will most likely do the majority of work in the driver's interrupt routine that, I hope, can be called when a pin or pins change state.
My questions are: 1. Has anyone experienced any difficulties with making custom drivers on openSUSE running on the Pi3? 2. Are there any drivers that are being loaded by openSUSE that fiddle with the I/O lines that I may need to disable? Currently, nothing is connected to the I/O lines.
Which pins are we talking about?
That's flexible. We can connect to any pins that are best suited.
Which interface do you want to use (SPI, I2C etc)?
It is not a standard interface. Just a trigger pin. But it can trigger up to 32 kHz. And we need to react to each of them. We would like to
So what does the interface look like exactly? How many lines do you have? How is the data encoded? Where is the latch and how long is it? The best case for devices like the RPi is to reuse existing IP blocks for the low level bit banging of wires. Some times a different protocol happens to match the low level protocol well enough to allow you to reuse it and offload things from the CPU.
try to stay away from commonly used lines so we could possibly also attach a device that uses such a protocol. But that is a secondary concern.
Which sensor do you want to connect?
It is a device that provides pulses related to movement. We monitor these and take action on them. Some actions are the manipulation of
So the duration of the pulse is the bit that provides information? On both edges? And max freq is 32khz? In that case, check out this stackexchange discussion: https://raspberrypi.stackexchange.com/questions/9787/pwm-input-in-raspberry-... The main problem is that with PWM while your edges are only 32khz apart, you need to oversample quite a bit to know where they are :). Alex -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
On Mon, Jun 26, 2017 at 8:30 AM, Alexander Graf <agraf@suse.de> wrote:
Which sensor do you want to connect?
It is a device that provides pulses related to movement. We monitor these and take action on them. Some actions are the manipulation of
So the duration of the pulse is the bit that provides information? On both edges? And max freq is 32khz?
In that case, check out this stackexchange discussion:
https://raspberrypi.stackexchange.com/questions/9787/pwm-input-in-raspberry-...
This I know. There is no way it works via a high level interface. As the reply indicated, one needs to use a kernel driver if one wants responsiveness. That is my intention. I have made kernel drivers before. This will be a first on an ARM system. So I am exploring what the status is. Thus my questions about how openSUSE is set up for this hardware. For example, are there any drivers that assume they can have exclusive access to some of the pins?
The main problem is that with PWM while your edges are only 32khz apart, you need to oversample quite a bit to know where they are :).
I do not intend to sample to sense the pulses. I expect to be interrupted when a pulse occurs. The pulse is the data. It is not a serial or some such signal from which I will derive data. Each individual pulse indicates that something has happened, and the driver must take action. The duration of the pulse is more of a hardware issue. That is, how long does the line driver on the PI3 require a pulse be for it to be detected and an interrupt delivered? It is this rate of interrupt that I am wondering about. This is pretty much all the device will be doing. The main reason for going with openSUSE is that the networking part is in place. Using openSUSE might be overkill. I am viewing it as a nice way to get a Linux kernel driver in place. And we a comfortable with it as an environment. We already use it as a diskless OS in data collection sub-systems and as the desktop in our measurement systems. I currently use a board where I need to run the TCP stack myself. Having a complete network available is something we have really wanted. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse-arm+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-arm+owner@opensuse.org
participants (3)
-
Alexander Graf
-
Matthias Brugger
-
Roger Oberholtzer