Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 2461

General discussion • exact meaning of pi 5 vcgencmd get_throttled

$
0
0
I KNOW WHAT THE BIT PATTERNS ARE. That's not the issue.
I threw together this program to decode the bit patterns.

Code:

# include <stdio.h># include <string.h>int main(int argc, char **argv ){int getval;char subtext[20];//input is throttled=0x00000 or some such.//               0123456789strcpy( subtext, &(argv[1][10]) );//printf("subtext= %s\n", subtext );sscanf( subtext, "%x", &getval );//printf("%d\n", getval );//printf("0x%x\n", getval );int mask0 = 0x1;int mask1 = 0x2;int mask2 = 0x4;int mask3 = 0x8;int mask16 = 0x10000;int mask17 = 0x20000;int mask18 = 0x40000;int mask19 = 0x80000;if( mask0 & getval ) printf("undervoltage\n");if( mask1 & getval ) printf("arm freq capped\n");if( mask2 & getval ) printf("currently throttled\n");if( mask3 & getval ) printf("soft temp limit active\n");if( mask16 & getval ) printf("undervoltage has occurred\n");if( mask17 & getval ) printf("arm freq has occurred\n");if( mask18 & getval ) printf("throttling has occurred\n");if( mask19 & getval ) printf("soft temp limit has occurred\n");return 0;}
HERE'S MY QUESTION:
I'm guessing that bits 0..3 are the **current** state of affairs, and that
bits 16..19 are the **has it ever happened** state. That is, bits 16..19 mean that undervoltage, etc, have occurred at some time in the past, but are not necessarily the present state. Bits 0..3 are what's happening right now. Thus, if you want assurance that the machine is going full tilt RIGHT NOW, you only care about bits 0..3. True?

BTW, when it says undervoltage, does it mean the actual voltage is low, or does it mean there was a current shortage?

I have a 40A 5V supply powering this thing, (yes, 200W, 40A, 5V), and yet I get 0x50000. I have usb_max_current_enabled=1 and MAX_PSU_CURRENT=5000 in config.txt, and I've watched the current and voltage inline with a USB monitoring device. I have trouble believing that things are truly askew.

Statistics: Posted by bigcrater — Tue Oct 01, 2024 8:46 pm



Viewing all articles
Browse latest Browse all 2461

Trending Articles