2020-03-19 05:07 PM
Could anybody help me to figure out the exact meaning of PWREN bit in register RCC_APB1ENR?
I could not find any comments in the STM32 programming reference mannual.
Thanks,
Troy
2020-03-19 05:15 PM
I am now working on the STM32L476VG, and for the demo USB_HID, when I disable the PWREN bit of register RCC_APB1ENR, the USB do not work, but I could not find any comments in the reference mannual, so how this bit works?
2020-03-19 11:04 PM
As with any other peripheral, this enables the PWR peripheral - read the Power controller (PWR) chapter in RM to find out, access to what peripheral features does this enable.
The relationship to USB will be indirect. You did not tell us the STM32 model you are using, and PWR changes from model to model quite a bit.
JW
2020-03-20 01:15 AM
Thanks for your comments!
I use the discoveryboard of stm32l476vgt6, I have read the Power controller chapter again. However, the concept of "power interface clock" makes me confused, does this is a clock for the power regulator of STM32 peripheral?
attached the reference manual of stm32l4 serial.
2020-03-20 02:20 AM
I understand your confusion, "power interface clock" may sound confusing at the first sight. However, it is expected, that you've read at least the first few chapters of the RM before starting working with the chips.
So, chapter 2.1.6 BusMatrix says:
After each device reset, all peripheral clocks are disabled (except for the SRAM1/2 and
Flash memory interface). Before using a peripheral you have to enable its clock in the
RCC_AHBxENR and the RCC_APBxENR registers.
"Peripheral" here refers to the modules (sometimes called IP), represented by the individual chapters later on in the RM, e.g. TIM, UART, etc. PWR is one of those peripherals, and you can't access its registers until you enable its clock.
Regardless of this, analog/power circuitry is working after reset according to the reset values of the PWR registers (see description of individual bits and bitfields in those registers in the PWR chapter).
JW
PS. Please don't attach files which are commonly available through a link, post the link instead. And you don't need to do even that for obvious resources - the RM is the basic tool used by all STM32 developers daily, so it's enough to refer to RM number (RM0351 in this case), every reader of this forum knows what does that mean.
2020-03-20 03:08 PM
Got it! thanks!
PS, it's my bad, I will not do this any more.