I want to understand power and temperature relationships on the AM62A and/or the AM62X. How do I do this with the starter kit (SK) EVM?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I want to understand power and temperature relationships on the AM62A and/or the AM62X. How do I do this with the starter kit (SK) EVM?
Regarding power, the starter kit EVMs for the AM62x and AM62A contain on-board current sensors to measure power usage on all of the voltage rails powering the SoC. These current sensors are INA231 ICs, and can be configured and read over an I2C bus.
There are 6 voltage rails into the SoC, and each of these is read by an INA using voltage measurements.:
Power is measured by reading a voltage across a small ( <<1 Ohm ) shunt resistor and the voltage of the bus itself (low side of the resistor). The shunt voltage is a proxy for current, and is calculated by knowing the value of the shunt resistor precisely. We use a high precision resistor (1%).
Since these INA’s are accessible over an I2C bus, they can be read directly from the SoC for measuring power during the active state. Please find the two python scripts below for the am62x and am62a, respectively. The only difference is in the I2C addresses and shunt resistor values.
Here are two python scripts for measuring power on the AM62A and AM62X starter kit EVMs:
AM62A: /cfs-file/__key/communityserver-discussions-components-files/791/read_5F00_power_5F00_am62a.py
AM62X: /cfs-file/__key/communityserver-components-multipleuploadfilemanager/3fbe1178_2D00_ad90_2D00_4e4a_2D00_b6ff_2D00_b18b64c3e929-360457-complete/read_5F00_power_5F00_am62x.py
To run these, a network connection is necessary so that a python package can be installed via pip.
python3 -m ensurepip pip3 install smbus2
Note that network settings and certificates may cause pip3 to throw errors. Explicitly trusting the host sites should fix this. It may be necessary to add a proxy with the --proxy tag if the device is behind a firewall e.g. on a corporate network.
pip3 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org install smbus2
When running AM62A in idle operation and with a high-load application, we can see a change in power usage. A heavy load application is run with the following command, which runs 4 streams of video with deep learning based analysis. Notice the increase in VDD core and LPDDR
/opt/edgeai-gst-apps/apps_python/app_edgeai.py /opt/edgeai-gst-apps/configs/multi_input_multi_infer.yaml
Regarding temperature, there are 3 Voltage and Thermal Monitors located around hotspots on the AM62A die. Note that since the sensors are on the SoC, the steps for measuring temperature are not dependent on using the AM62A SK EVM.
The dtsi file containing the temperature threshold configuration for AM62A can be found in:
<ti-processor-sdk-linux-path>/board-support/linux-<version> /arch/arm64/boot/dts/ti/k3-am62a-thermal.dtsi
The temperature parameter is threshold for the trip type. This critical trip temperature is set to 105°C by default. Any cooling action initiated by the framework is maintained until the temperature falls below (trip temperature – hysteresis). This potentially prevents a situation where the trip gets constantly triggered soon after the cooling action is removed.
More documentation on thermal zones and parameters can be found in:
<ti-processor-sdk-linux-sdk-path>/board-support/linux-<version> /Documentation/devicetree/bindings/thermal/thermal-zones.yaml
To test cooling and shutdown, use the following steps:
cat /sys/class/thermal/thermal_zone*/temp
The device is expected to shut down when the critical trip temperature is reached.