cancel
Showing results for 
Search instead for 
Did you mean: 

understand mmw command

vrai
Associate II

Question: I have an example here that assign TRACE_IOEN and TRACE_MODE to sync 1 bit from the DBGMCU_CR register (Address: 0xE004 2004) by using this command: mmw 0xE0042004 0x00000060 0x000000c0.

 What the 0x000000c0 doing in the mmw command ?

my basic understanding for mmw is this: mmw address setbits clearbits

Thanks

image from reference manual of stm32f4:

vrai_0-1698854082467.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
vrai
Associate II

This is how mmw work:

 

mmw 0xE0042004 0x00000060 0x000000c0 is similar to this:

mmw address setbits clearbits  where the new_val = (old_val & ~clearbits) | setbits]

Result: new_val = (old_val_is & ~0x000000c0) | 0x00000060

 

mmw 0xE0042004 0x00000060 0x000000c0 is similar to this as well:

DBGMCU_APB1_FZ &= ~0x000000c0
DBGMCU_APB1_FZ |= 0x00000060

View solution in original post

1 REPLY 1
vrai
Associate II

This is how mmw work:

 

mmw 0xE0042004 0x00000060 0x000000c0 is similar to this:

mmw address setbits clearbits  where the new_val = (old_val & ~clearbits) | setbits]

Result: new_val = (old_val_is & ~0x000000c0) | 0x00000060

 

mmw 0xE0042004 0x00000060 0x000000c0 is similar to this as well:

DBGMCU_APB1_FZ &= ~0x000000c0
DBGMCU_APB1_FZ |= 0x00000060