check that INT_TMR_MATCH is not set to invalid interrupt
remove unnecessary signed comparisons with unsigned type
handle zero element size for bitarray