Using µVision V5.28.0.0. for STM32G071.Executing TIM3->EGR |= TIM_EGR_UG; will result in correct asm code, ;;;1156 TIM3->EGR |= TIM_EGR_UG; // Force update generation (UG = 1)0000b8 4608 MOV r0,r10000ba 6940 LDR r0,[r0,#0x14]0000bc 2101 MOVS r1,#10000be 4308 ORRS r0,r0,r10000c0 491c LDR r1,|L20.308|0000c2 6148 STR r0,[r1,#0x14]butWatch of TIM3 shows SR changed instead of EGRTIM3 SR 0x00000001.Seems in any info file for MDK and STM32G0 there is a wrong offset for watch of SR/EGR stored.Where can I modify this ?Best regards
How to properly post source code:
0x40000400: 80 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 03 00 00 00 //......... CR1........ CR2........ SMCR....... DIER....... SR......... EGR........ CCMR1......
;;;1157 TIM3->DIER |= TIM_DIER_UIE; 0000b8 4608 MOV r0,r1 0000ba 68c0 LDR r0,[r0,#0xc] 0000bc 2101 MOVS r1,#1 0000be 4308 ORRS r0,r0,r1 0000c0 4922 LDR r1,|L20.332| 0000c2 60c8 STR r0,[r1,#0xc] ;;;1158 TIM3->SR |= TIM_SR_UIF; 0000c4 4608 MOV r0,r1 0000c6 6900 LDR r0,[r0,#0x10] 0000c8 2101 MOVS r1,#1 0000ca 4308 ORRS r0,r0,r1 0000cc 491f LDR r1,|L20.332| 0000ce 6108 STR r0,[r1,#0x10] ;;;1159 TIM3->EGR |= TIM_EGR_UG; 0000d0 4608 MOV r0,r1 0000d2 6940 LDR r0,[r0,#0x14] 0000d4 2101 MOVS r1,#1 0000d6 4308 ORRS r0,r0,r1 0000d8 491c LDR r1,|L20.332| 0000da 6148 STR r0,[r1,#0x14] ;;;1160 TIM3->CCMR1 |= TIM_CCMR1_CC1S; 0000dc 4608 MOV r0,r1 0000de 6980 LDR r0,[r0,#0x18] 0000e0 2103 MOVS r1,#3 0000e2 4308 ORRS r0,r0,r1 0000e4 4919 LDR r1,|L20.332| 0000e6 6188 STR r0,[r1,#0x18]
Result: Cannot write anything to TIM3->EGR.Writes to TIM3->EGR are stored in SR.Writes to DIER and CCMR1 are stored ok.Maybe one can check the binary codes in asm-txt- output.Juergen