Interrupts no information in official documents

Unfortunately, Renesas put their own weird interrupt system (the ICU) on top of what is essentially a CM0-style NVIC (32 vectors worth.) The ICU arbitrarily multiplexes close to 200 possible "Events" onto the 32 NVIC vectors.

So "attaching" an interrupt to an event is more complicated than a basic M4 NVIC configuration - basically you have to find a free NVIC slot, and then set up the ICU to bind that slot to the desired event.

I believe that the Arduino void attachInterrupt(pin_size_t pinNumber, voidFuncPtr func, PinStatus mode) does all of this, for pins on which interrupts are permitted. Except that I'm not sure which pins those are, since it looks like the Renesas "core" was written by ... someone at Renesas? It's dramatically different than any of the other ARM cores (and ugly, IMO. With a lot of confusing indirection.)

1 Like