many possible problems fixed in preparation for thread-safe
This trick does not fix GPIO interrupts. Different INUM maybe for GPIO on APP cpu