Fields in Register Display -

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fields in Register Display -

Jump to solution
512 Views
Cdn_aye
Senior Contributor I

In CW 10.3 it is possible to display the registers as with previous versions, but is there any way to also display the register fields correlated with the register display. For example in the Kinetis k40 there are a number of fields per register and several hundred registers to correlate to the PDF doc set. Manually tracking a large number of fields during a debugging session is problematic for human error. Is there any way to display the register fields/bit positions with names. For example in the Flextimer there is a FMT0, 1, 3 timer, in a given timer for a given field, for example FTM0, there are a set of defines in the MK40Z.h file that lists out all the registers, these correspond exactly to the doc set RM. To use an example for the flextimer, status register FTM0_SC, has defined CW header file fields FTM0_SC_TOF_MASK, FTM0_SC_TOIE_MASK, FTM0_SC_CPWMS_MASK and so on. Since there are available to the compiler is there anyway to see them with the debugger? Looking at 0x57, is a lot less obvious that seeing that the TOIE is set, and that the system clock is selected with a prescale of 7 (128).

 

Thanks

 

Robert

Labels (1)
0 Kudos
Reply
1 Solution
381 Views
CrasyCat
Specialist III

Hello

I do not have a Kinetis board to try out with this one, but with many other MCUs or CPUs I am used to you can get a detailed description of the register fields in the Registers view.

Just maximize the view and you should see the registers as bitfields. clicking on a bit in the Bit Fields will show the current value of the bit and below you will see the description of each of the fields.

In the screen dump below, I am debugging a HCS08 application. I have selected an Horizontal layout

and I can see the description of the single bits in the SPI device.

2361_2361.png

The default layout is Vertical. In order to see the single bits and their description in that layout, just maximize the Register View.

To activate the horizontal Layout

  • Click on the small down arrow icon on the top of the Registers View

2362_2362.png

  • Select Layout > Horizontal.

As I told you I cannot verify whether this is available this way for Kinetis as well, but it works for a bunch of other MCUs. So it might be worth a try.

CrasyCat

View solution in original post

0 Kudos
Reply
2 Replies
382 Views
CrasyCat
Specialist III

Hello

I do not have a Kinetis board to try out with this one, but with many other MCUs or CPUs I am used to you can get a detailed description of the register fields in the Registers view.

Just maximize the view and you should see the registers as bitfields. clicking on a bit in the Bit Fields will show the current value of the bit and below you will see the description of each of the fields.

In the screen dump below, I am debugging a HCS08 application. I have selected an Horizontal layout

and I can see the description of the single bits in the SPI device.

2361_2361.png

The default layout is Vertical. In order to see the single bits and their description in that layout, just maximize the Register View.

To activate the horizontal Layout

  • Click on the small down arrow icon on the top of the Registers View

2362_2362.png

  • Select Layout > Horizontal.

As I told you I cannot verify whether this is available this way for Kinetis as well, but it works for a bunch of other MCUs. So it might be worth a try.

CrasyCat

0 Kudos
Reply
381 Views
Cdn_aye
Senior Contributor I

CrasyCat

Thank you; I think I must have had the collapsed in the bottom panel. This was very helpful... thanks again

Robert

0 Kudos
Reply