This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

V5.28, register watch

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,r1
0000ba  6940              LDR      r0,[r0,#0x14]
0000bc  2101              MOVS     r1,#1
0000be  4308              ORRS     r0,r0,r1
0000c0  491c              LDR      r1,|L20.308|
0000c2  6148              STR      r0,[r1,#0x14]
but
Watch of TIM3 shows SR changed instead of EGR
TIM3
    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

Parents
  • The System Viewer debug window works based on CMSIS-SVD standard, namely the *.svd and *.sfr files included in the corresponding device family pack. A wrong register offset value in such a svd file might cause the issue you observed. Since these files come from ST, if there is anything to be fixed in such svd and sfr files, you have to wait for a new pack release, which would cause you a certain of delay. 

    Therefore, as workaround, you could modify the corresponding offset value for a register directly in the corresponding svd file located in your pack installation folder and then call svdconv.exe based on  http://www.keil.com/pack/doc/CMSIS/SVD/html/svd_SVDConv_pg.html to convert it to a sfr file. And replace both svd and sfr files in the original directory. After restarting uVision, the issue should be fixed. 

Reply
  • The System Viewer debug window works based on CMSIS-SVD standard, namely the *.svd and *.sfr files included in the corresponding device family pack. A wrong register offset value in such a svd file might cause the issue you observed. Since these files come from ST, if there is anything to be fixed in such svd and sfr files, you have to wait for a new pack release, which would cause you a certain of delay. 

    Therefore, as workaround, you could modify the corresponding offset value for a register directly in the corresponding svd file located in your pack installation folder and then call svdconv.exe based on  http://www.keil.com/pack/doc/CMSIS/SVD/html/svd_SVDConv_pg.html to convert it to a sfr file. And replace both svd and sfr files in the original directory. After restarting uVision, the issue should be fixed. 

Children