2023-11-01 09:01 AM - edited 2023-11-02 07:08 PM
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:
Solved! Go to Solution.
2023-11-01 12:02 PM - edited 2023-11-01 12:30 PM
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
2023-11-01 12:02 PM - edited 2023-11-01 12:30 PM
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