Dev tools dont load certain register/bit definitions??!! - Page 1
Forum section: electronics / general

author: MT
author_rank: Super Contributor
timestamp: March 24, 2019, 11:32:50 pm
content: STM32F3xxIn EmBitz both CFGR3 and CFGR4 is missing in the system register editor window. Both registers and their bit fields are defined in the stm32f30x.h perhiperial def file like this;__IO uint32_t CFGR3; /*!< SYSCFG configuration register 3, Address offset: 0x50 */__IO uint32_t CFGR4; /*!< SYSCFG configuration register 4, Address offset: 0x48 *//***************** Bit definition for SYSCFG_CFGR3 register *****************/#define SYSCFG_CFGR3_SPI1_RX_DMA_RMP ((uint32_t)0x00000003) /*!< SPI1 RX DMA remap *//***************** Bit definition for SYSCFG_CFGR4 register *****************/#define SYSCFG_CFGR4_ADC12_EXT2_RMP ((uint32_t)0x00000001) /*!< ADC12 regular channel EXT2 remap */And since they dont show up i cant access them from the dev tool. I wonder what has gone wrong or is missing during project load or something? Ideas?Edit: As im looking through the STM32F334x.svd and the STM32F30x.svd files i find that CFGR3 and CFGR4is missing, surprise, surprise!! So where do one find the proper svd files, can i just fill in the register defs in the old funky svd file?

author: ataradov
author_rank: Super Contributor
timestamp: March 25, 2019, 12:47:23 am
content: Just edit the SVD files you have. Sometimes things go missing, I doubt there are "better" files out there.

author: MT
author_rank: Super Contributor
timestamp: March 25, 2019, 02:09:03 am
content: Okeidokeli, i edited the svd file, now CFGR3 shows but when open register value box to change value from 0x0 to 0x1 it dont change to new value?! When i stop the debug session the register viewer should load in the content of the registersit does that for all other registers except for CFGR3. I quadruple checked the bit offsets etc, cant se any particular in the edited svd section.

author: ataradov
author_rank: Super Contributor
timestamp: March 25, 2019, 02:15:30 am
content: Actually it looks like there are SVD files that have those things defined :https://raw.githubusercontent.com/MaJerle/stm32f429/master/00-STM32_SVD/STM32F334x.svdandhttps://raw.githubusercontent.com/MaJerle/stm32f429/master/00-STM32_SVD/STM32F30x.svd

author: MT
author_rank: Super Contributor
timestamp: March 25, 2019, 02:28:21 am
content: Nope, none of them, if you look at line 24338 (Notepad++) CFGR2 starts there after that RCR is due.The CFGR3 and 4 im looking for is located in SYSCFG, the one CFGR3 you see is probably for RCC AHB.

author: ataradov
author_rank: Super Contributor
timestamp: March 25, 2019, 02:34:24 am
content: Yeah, CFGR3 is present in RCC, but not in SYSCFG.So what exactly does not work after your modification? IDE does not let you edit the values, or the changes do not apply?Also, what specific part do you use? Those registers are not available on all parts.

author: MT
author_rank: Super Contributor
timestamp: March 25, 2019, 02:40:50 am
content: Precisely! Cant change register values on the fly nor does register settings in code take any affect after compile.As noted previously F334.

author: ataradov
author_rank: Super Contributor
timestamp: March 25, 2019, 02:42:27 am
content: Check that you have a part that actually has those registers:SYSCFG_CFGR3 - This register is available in STM32F303x6/x8 and STM32F328 devices only.SYSCFG_CFGR4 - This register is available in STM32F303xD/E and STM32F398xE devices only.

author: MT
author_rank: Super Contributor
timestamp: March 25, 2019, 02:52:45 am
content: applies to F328 F358,F373,F398,303 as well..

author: ataradov
author_rank: Super Contributor
timestamp: March 25, 2019, 03:03:27 am
content: If even writing those registers from the code does not work, then it looks like those registers are not implemented. They should be for F334, so I have no idea what is going on.

author: MT
author_rank: Super Contributor
timestamp: March 25, 2019, 03:08:47 am
content: Yeah, the reg'st should be there for all the mentioned devices , they all sit on same Address offset: 0x50!... It's very strange indeed!

author: boB
author_rank: Frequent Contributor
timestamp: June 08, 2020, 08:45:32 am
content: Hi guys... Just ran across this older post but it is pretty much a thread I was wondering about myself...In my case, for the STM32F334 (any of the parts) the A/D converter registers in the debugger are not both there independently.There is ADC1_2 but not ADC1 and ADC2 and it would appear to be only showing ADC1.I can edit the .svd file of course but I was wondering if there might be some reason that someone knows about why this might be ?Thank you !boB

author: boB
author_rank: Frequent Contributor
timestamp: June 08, 2020, 08:52:48 am
content: Yeah, nevermind probably....Googling some more I find on IAR's web site this...[EWARM-5425, EW26060] Missing definition of register ADC2 in the SVD file for STM32F334C8.And the version of IAR I am using is 6.50 and our version 7.20 had the same ADC1_2 definition sothey evidently have never fixed it.OK, off to edit an .svd file I go.