Why ACTVOSRDY bit and VOSRDY bit are always 0 after changing VOS bits in PWR registers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 5:09 AM
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... :(
}
Solved! Go to Solution.
- Labels:
-
Power
-
STM32H7 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 7:13 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 6:15 AM
Custom board? How is VCORE supplied? What is voltage on VCAP pins if you measure them with multimeter?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 6:21 AM
Yes, a custom board. VCORE is supplied from internal LDO (1.2uF capacitor is connected to VCAP pin). The voltage is 1.01V
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 6:36 AM
> The voltage is 1.01V
That's below the VOS1 threshold, so bits not being set is the correct behavior.
Not real sure.
There are two VCAP pins, both should have a 2.2uF cap.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 7:13 AM
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
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 7:45 AM
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.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-03-01 7:54 AM
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
