Hi Jeff
I see, your code base is doing long word accesses which is making it over-complicated.
This is the simplest way - just write each priority as a byte and then there is no complication.
volatile unsigned char *ptrPriority = IRQ0_3_PRIORITY_REGISTER_ADD; // set a pointer to the first priority register location
ptrPriority += iInterruptID; // move to the priority location used by this interrupt
*ptrPriority = (ucPriority << __NVIC_PRIORITY_SHIFT); // define the interrupt's priority (16 levels for K and 4 levels for KE/KL)
Otherwise the PIT one for KL05 does happen to be a 16 bit shift (but you need to calculate the shift for each ID and it will change depending on which processor you are on - non-portable and costs time, money and new testing/debugging in case you were to need to re-use code on a different part.
KL05 PIT interrupt ID is 0x16 (22), so it needs to be set in the IRQ20_23_PRIORITY_REGISTER priority register (this is the 6th register in this area and therefore your framework presumably calls it NVIC_IPR5.
The actual bit involved to set a priority of 1 is 0x00400000, so your formula is correct.
You do still have an error though because
NVIC_IPR5 = (ucPriority << (__NVIC_PRIORITY_SHIFT + 16));
writes the other three neighbor vector priorities to 0 (if they were previously set), so the correct code when doing this particular interrupt's long word access would be:
NVIC_IPR5 = (NVIC_IPR5 & 0xff00ffff) | (ucPriority << (__NVIC_PRIORITY_SHIFT + 16)));
Therefore I prefer the simple byte access method (above) because it only requires the ID of the interrupt to be known and no calculating on the back of a napkin is needed each time one is used (with the associated risk of errors).
By the way, the user's manual gives the description for each priority register, showing the locations (and shifts) involved.

Finally, you may find code doing this (eg. Cortex CMSIS code)
int iPriorities = 1;
unsigned long ullPriority;
IRQ0_3_PRIORITY_REGISTER = 0xff0000; // set lowest priority (hoping 256 are available)
ulPriority = IRQ0_3_PRIORITY_REGISTER; // read back the register to see how many bits stuck
while ((ulPriority & 0x80000000) != 0) { // if the priority bit is implemented
iPriorities *= 2;
ulPriority <<= 1;
}
//iPriorities now is equal to the priority levels that this processor type supports...
Regards
Mark