Splitting PIO on Coldfire / ucLinux

Here's the problem: I need to program some equipment through 2 PIO pins (1 clock, 1 data). Dates are limited - 10 ms. All this, of course, while I maintain a very high level of services (CAN bus, TCP / IP). The downstream unit is also ACKS, claiming the PIO pin configured as input is high. Thus, this cycle must be read and written. I need to send 16 bits to a serial stream.

Is there an established way to do such things, or do I just want the hardware guys to add PIC or something like that.

I would prefer to avoid the exotic, for example, the RTAI extension at this point. I once saw a link to user I / O mode, which implied a possible driver controlled by interrupts, but lost it.

Any pointers are welcome.

+3
source share
1 answer

The easiest way, in my experience, is to write a kernel driver. Of course, of course, that it is not there yet - 1 beat, 1 sound sounds like i2c-like (although the sound at 10 ms sounds much slower than i2c), and there are i2c bit-drivers for Coldfire that already exist. Even if it's not i2c, you can find i2c-adap-mcf_gpio to use as a starting point.

In fact, you are lucky that the 10-second cycle - by default, the checkmark core is 10 ms (and you can configure it if necessary), so you should be able to use the appropriate sleep functions for the kernel.

( , ​​ . - 2.6 - 2.4, .)

0

Source: https://habr.com/ru/post/1737954/


All Articles