cancel
Showing results for 
Search instead for 
Did you mean: 

Why ACTVOSRDY bit and VOSRDY bit are always 0 after changing VOS bits in PWR registers?

MSale.4
Associate II

These bits are always 0 and I can't change the voltage scaling of MCU (The code is stuck at both "while"s). The MCU P/N is STM32H743IIT6. The starting part of the code is:

int main(void)
{
    PWR->D3CR=0x0000C000; //changing voltage scaling to VOS1
    while(((PWR->CSR1)&(0x00002000))==0); //Waiting for voltage scaling
    while(((PWR->D3CR)&(0x00002000))==0); //Waiting for voltage scaling
 
//MCU runs no more code lines... :(
}

1 ACCEPTED SOLUTION

Accepted Solutions

You're right, there are two VCAP pins and a 1.2uF cap is connected to each one (so no mistake in this part). I made a little change in my code and I think the problem is solved (Actually I wrote the value of the PWR_CR3 register equal to its reset value! (I don't know why but it works!):

    int main(void)
    {
        PWR->CR3=0x00000004; //Activating single write enabled to supply configuration
        PWR->CR3=0x00000002; //Normal operation and LDO is enable
        PWR->D3CR=0x0000C000; //changing voltage scaling to VOS1
        while(((PWR->CSR1)&(0x00002000))==0); //Waiting for voltage scaling
        while(((PWR->D3CR)&(0x00002000))==0); //Waiting for voltage scaling
    }

View solution in original post

6 REPLIES 6
TDK
Guru

Custom board? How is VCORE supplied? What is voltage on VCAP pins if you measure them with multimeter?

If you feel a post has answered your question, please click "Accept as Solution".

Yes, a custom board. VCORE is supplied from internal LDO (1.2uF capacitor is connected to VCAP pin). The voltage is 1.01V

TDK
Guru

> The voltage is 1.01V

That's below the VOS1 threshold, so bits not being set is the correct behavior.

0693W00000KazFTQAZ.png 

Not real sure.

There are two VCAP pins, both should have a 2.2uF cap.

If you feel a post has answered your question, please click "Accept as Solution".

You're right, there are two VCAP pins and a 1.2uF cap is connected to each one (so no mistake in this part). I made a little change in my code and I think the problem is solved (Actually I wrote the value of the PWR_CR3 register equal to its reset value! (I don't know why but it works!):

    int main(void)
    {
        PWR->CR3=0x00000004; //Activating single write enabled to supply configuration
        PWR->CR3=0x00000002; //Normal operation and LDO is enable
        PWR->D3CR=0x0000C000; //changing voltage scaling to VOS1
        while(((PWR->CSR1)&(0x00002000))==0); //Waiting for voltage scaling
        while(((PWR->D3CR)&(0x00002000))==0); //Waiting for voltage scaling
    }

You should probably mask on new bits/settings, not blindly write the registers.

If you run into issues sanity check with library code to ensure it's not your technique that is failing.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Of course that I didn't write blindly to them! I expected these bits to have those values as their reset value, so initiating them with reset value is not a problem.

TNX