Why does my BASEPRI value seem to be incorrect?

Showing results for 
Search instead for 
Did you mean: 

Why does my BASEPRI value seem to be incorrect?

Contributor III

I am working on a project using the MK22DN512VLK5.

Using CW MCU 10.5 and MQX Lite

In trying to debug an interrupt issue, I am seeing something that is just downright weird!

I am using the Freescale toolchain.

In single-stepping through the _int_disable() code, I am seeing that R3 is 0x00000040 and then the "msr BASEPRI,R3" instruction is executed.

Immediately following that, the BASEPRI register (as seen by the register display in the Debug view) changes from 0x00000000 to 0x00004000  (??)

According to the docs, that means that the instruction updated the reserved area of the register, not the valid area (low order byte)

I think the most reasonable assumption is that the debugging display is showing the contents incorrectly, but I am not sure of this either.


Is the display incorrect?

Or is the chip mis-behaving - even more unlikely?

Labels (1)
0 Kudos
1 Reply

NXP Employee
NXP Employee

Hi Stephen,

Have you tried CW10.6 or GCC toolchain? Actualy, Freescale toolchain is no longer used in Kinetis devices, CW10.6 only supports GCC.

Best regards,


0 Kudos