Why does my BASEPRI value seem to be incorrect?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Why does my BASEPRI value seem to be incorrect?

1,041 次查看
Symbolic
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?

标签 (1)
0 项奖励
1 回复

899 次查看
Carlos_Musich
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,

Carlos

0 项奖励