Request for library change: flexibility in interrupt pin choice

109 views
Skip to first unread message

stevech

unread,
Apr 10, 2014, 12:10:55 PM4/10/14
to rf22-a...@googlegroups.com

As I use and understand the library, the RF22 as a logical unit 0, 1, 2 must use only the same external interrupt pin.
My change nomination is to decouple this, so that logical unit 0-2 can utilize any pin number the user chooses. I use the library with an ARM Cortex M4 (Teensy3) which has an AVR/Arduino compatibility software suite. Any of that ARM CPU's digital pins can be an interrupt. Pin 0 on that CPU is by default UART1 of 3. It would be much better to use, say, pin 6 for the RF22's nIRQ. I could change the code in the RF22 lib. But I don't want to change that code because subsequent releases of the library would cause a configuration mess if I alter the baseline.

A table of pin number vs. radio logical unit number 0..3 would do this. Table contains pin numbers.
Also, the "isr0", "isr1" and so on would have to correspond.

I'd make these changes, test and submit if it would go into the baseline; otherwise I'll stick with not changing the library.


steve

PS: On the ARM Cortex (from all vendors), there is a vectored interrupt controller (VIC) in the CPU. At run time, you can set the ISR address into the VIC for any function/pin, so there doesn't need to be a hard coded ISR vs. pin #. Since the Teensy3 emulations the libraries and I/O of an AVR, and adds all the newer I/O, and 256KB flash/64KM ram at less cost than most Arduino boards, I've gone this route, with declining use of 8 bit AVRs. The development tool can be either the Arduino IDE or VisualMicro.com.

Mike McCauley

unread,
Apr 10, 2014, 4:59:13 PM4/10/14
to rf22-a...@googlegroups.com
Hello Steve,

Thanks for your note.

I am currently in the process of rewiring RF22 and combining it with drivers
for several other radios, to make a complete portable comms library supporting
a range of radio hardware and host processors.

Currently I have all the RF22 message handlers (Datagram, ReliableDatagram,
Router, Mesh working with drivers for RF22, RF69, Serial ports and ASK
transceivers (like VirtualWire does).

I will look at your suggestion for that new library, instead of breaking the
existing subset RF22 library.

Cheers.
--
Mike McCauley VK4AMM mi...@airspayce.com
Airspayce Pty Ltd 9 Bulbul Place Currumbin Waters QLD 4223 Australia
http://www.airspayce.com
Phone +61 7 5598-7474 Fax +61 7 5598-7070

Mike McCauley

unread,
Apr 12, 2014, 1:22:38 AM4/12/14
to rf22-a...@googlegroups.com
Hi Steve,

I dont plan to make any further changes to the RF22 library, since it will
soon be subsumed in the new RadioHead library, along with RF69, VirtualWire
etc.

I expect that RadioHead will have the sort of decoupling you ask for.

Cheers.

On Thursday, April 10, 2014 09:10:55 AM stevech wrote:

stevech

unread,
Apr 12, 2014, 2:35:49 PM4/12/14
to rf22-a...@googlegroups.com
OK good. Nothing to read on-line yet about RadioHead? (RadioHead.com is, seemingly, N/A)

Mike McCauley

unread,
Apr 12, 2014, 6:33:04 PM4/12/14
to rf22-a...@googlegroups.com
On Saturday, April 12, 2014 11:35:49 AM stevech wrote:
> OK good. Nothing to read on-line yet about RadioHead?

Nothing yet.
Soon.

Cheers.
Reply all
Reply to author
Forward
0 new messages