Skip to main content
MSale.4
Associate II
March 1, 2022
Solved

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

  • March 1, 2022
  • 2 replies
  • 1906 views

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... :(
}

This topic has been closed for replies.
Best answer by MSale.4

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
 }

2 replies

TDK
Super User
March 1, 2022

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""."
MSale.4
MSale.4Author
Associate II
March 1, 2022

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

TDK
Super User
March 1, 2022

> 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""."
MSale.4
MSale.4AuthorBest answer
Associate II
March 1, 2022

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
 }

Tesla DeLorean
Guru
March 1, 2022

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 VenmoUp vote any posts that you find helpful, it shows what's working..