MSom not behaving like BSom on D2 and D3

We have a Wiegand setup on D2 and D3, which is working just fine on the B524.

Now we wan't to move to M524, which is a newer and more versatile device. But for some reason our Wiegand implementation does not work on the M524.

As mentioned we use D2 and D3.

Here is the setup of D2 and D3:

pinMode(D2, INPUT_PULLUP);				
pinMode(D3, INPUT_PULLUP);					// Set D1 pin as input
attachInterrupt(D2, ReadD2, FALLING);	// Hardware interrupt - high to low pulse
attachInterrupt(D3, ReadD3, FALLING);	// Hardware interrupt - high to low pulse

But on the MSom, ReadD2 and ReadD3 is not called at all.

Any ideas, why this is different on the Msom?

I suspect it will impossible to process Wiegand on the M-SoM (RTL872x). The problem is that the GPIO is very slow, slower than the pulse width of Wiegand, so even with interrupts it will not be able to process it.

In some cases, like Neopixel, the SPI peripheral can be used to generate timing sensitive pulses. It also can be used for input. Since Wiegand requires two inputs (clock and data), it would require using two SPI peripherals, which is probably not practical because it would be difficult to synchronize them, even if you had two available.

That is sad news :frowning:
Do you have an isea for alternatives. Like Modbus etc.

What I would do is use an inexpensive coprocessor (PIC, STM32, etc.) to convert Wiegand to UART serial. You can optionally use Asset OTA to be able to remotely reprogram the coprocessor. As an added bonus you could use a 5V tolerant 3.3V coprocessor so you wouldn't need the level shifters on clock and data.

Thanks for the guidance. But why did you use a processor with weaker GPIO? We have now used the GPIO on Argon, Boron, and B524, with no problems what so ever.