ms-iot / lightning

MIT License
16 stars 20 forks source link

Interrupts using identical code does not work with Lightning drivers for RPi 3B #61

Open mmccullo opened 5 years ago

mmccullo commented 5 years ago

I have exactly the same code and it does not work using the Lightning drivers (Direct Memory Mapped) vs. the standard drivers (Inbox) on an RPi 3B. The interrupt is seen once with the Direct Memory Mapped driver, and it never fires again. Please note that the interrupt works perfectly with the standard Inbox drivers.

The code follows. The irq_gpio4_ValueChanged() function is the critical issue. This interrupt fires at a 30 Hz rate generated from external hardware input to gpio4.

The code is compiled against the latest 17763 API, latest stable Lightning release, and is running on the 17763 build on the RPi 3B.

register.zip

mmccullo commented 5 years ago

Also, the ReadValue() and WriteValue() methods in register.cpp are an attempt to read/write an 8-bit parallel byte to the hardware via bit banging each individual line as I must interface to a baseboard designed for a PC/104 bus. I have mentioned the issue before, but a single virtual byte I/O that can read/write the bit states in the processor as a group with one API call would be exceedingly useful.