Why I can not change the value of a peripheral registry in Debug?

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

Why I can not change the value of a peripheral registry in Debug?

1,179 Views
andreacanepa
Contributor IV

With MCUXpresso IDE 10.0.0 and board TWR_KV58F220M, Debugging with PEmicro OpenSDA.

I'm in debug mode, I have stopped the cpu.

In the "Peripheral +" window I select a peripheral (for example, UART0), immediately in the "Memory" window all the registers associated with that peripheral appear with the ability to SEE the values of those registers.

I select a register (for example UART0_C1[PT]), on the right side I see "Value_0": ok it's the register value.

I click on "Value_0" and the selection of possible values appears, I select "Value_1" to change the value of that register from 0 to 1: immediately the register closes but the value does not change. If I control the log value, it has remained as "Value_0" previously.

In MCUXpresso how can I change the value of registers during debugging?

Regards

Andrea

Labels (1)
5 Replies

906 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Andrea,

Please make sure that the clock to the UART 0 module is enabled. I would also recommend that you use the latest MCUXpresso version 10.0.2.


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos

906 Views
andreacanepa
Contributor IV

Hi Carlos,

Surely the UART0 clock is enabled: it is communicating with FreeMaster. Unless when the MCU goes into Debug mode it turns off the clock. It could be?

Yesterday I installed MCUXpresso 10.0.2 (I did not notice the new release) and did the same test; this time the result is different, an error window is also displayed:

Cattura.PNG

Obviously, I can not change the registry value.

I try to change also the register MCG_C6[LOLIE0] from Value_0 to Value_1: I have the same problem!

I have the impression that the logs are locked in writing. Is there some protection that might be active?

Regards

Andrea.

0 Kudos

906 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Sorry for the problems you are seeing with using the Peripheral Register view.

We've replicated the "Wrong field offset" issue, which is triggered when trying to edit fields within a peripheral register.  We'll investigate fixing this for the next IDE release (currently expected towards the end of November).

You should be able to workaround in the meantime by editing at the register level (rather than at the bitfield level) or by using CMSIS-DAP probe firmware.

Regards,

MCUXpresso IDE Support

906 Views
andreacanepa
Contributor IV

LPCX support ha scritto:

You should be able to workaround in the meantime by editing at the register level (rather than at the bitfield level)

Actually today I tried to change the value of other registers during the debugging phase (with MCU in stop) and I did not succeed!

For example I wanted to change the "FMT1-EXTTRIG" register from 0x0 to 0x40: I clicked on the value of the register, wrote my value (0x40) then I pressed the ENTER key but the registry did not change.

I also tried writing the value as 0x00000040 thinking maybe you should write the 32-bit integer value, but it does not change.

Am I wrong?

Regards

Andrea

0 Kudos

906 Views
andreacanepa
Contributor IV

LPCX support ha scritto:

 

You should be able to workaround in the meantime by editing at the register level (rather than at the bitfield level) or by using CMSIS-DAP probe firmware.

Yes, I've verified that I can change the values directly at the register level.

But I did not understand what you meant with "...or by using CMSIS-DAP probe firmware".

In my card there is PEmicro OpenSDA installed. Do I have to replace it to use the bit access?

Regards

Andrea.

0 Kudos