Search found 21 matches

by oldndumb
Fri Mar 08, 2024 11:04 am
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

uint32_t reading = adc1_get_raw(ADC1_CHANNEL_5); uint32_t voltage = esp_adc_cal_raw_to_voltage(reading, adc_chars); Yes, I am using the above, but it is still inaccurate. It brings me only slightly close to what I am actually reading with a voltmeter. My job aim is to get as closed as possible to t...
by oldndumb
Thu Feb 29, 2024 12:09 pm
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

@johann75 And I politely disagree with you. Esp32 is not 'completely' inaccurate or useless. Now why don't you start by explaining what you would like to achieve and why it doesn't work for you? I've already told you that I don't work with the arduino framework, so I dont have a 'sketch'. If you are...
by oldndumb
Thu Feb 22, 2024 5:27 pm
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

This is done with the decode_reg_bits function. In it you see a lot of bitwise operations. >> means right shift, moving a binary number a number of bits to the right. & means bitwise AND. With it you can set certain regbits to 0. | means bitwise OR. Which lets you set certain regbits to 1. ~ means N...
by oldndumb
Wed Feb 21, 2024 10:17 am
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

@johann75 What is your actual question? You're requiring me to spend time reading your long posts but, it isn't clear what you actually want. So please be more specific. //or did you just want to share your solution to find vref? With the struct member adc_chars.vref and the calibration function tha...
by oldndumb
Wed Feb 21, 2024 7:34 am
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

@johann75 Seems you are using the arduino platform and not esp-idf. There's no point in explaining. To use these functions you need all the #includes. Unless you have a very specific question regarding my code, you're better off asking arduino platform questions in the arduino forum. Try to make ver...
by oldndumb
Sun Jan 21, 2024 12:10 am
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Re: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Alright. I found a way of getting my vref value and for example the mac address in code. I think there should be a way of using esp_efuse_read_field_blob for the vref too... And probably multiple other ways as well. But I wasn't able to adapt it for the vref register yet... perhaps someone else know...
by oldndumb
Sat Jan 20, 2024 2:54 pm
Forum: ESP-IDF
Topic: Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?
Replies: 13
Views: 3950

Get efuse vref value in code, "espefuse.py --port [PORT] adc_info" equivalent in onboard code?

Hi there,

Anyone know if I can get the value of the reference voltage (vref) burned in efuse through a built in esp-idf function?
I know I can get it "outside of the board" with espefuse.py --port [PORT] adc_info, but I like to use and display the vref value per board. Mostly out of curiosity ;)
by oldndumb
Fri Jan 19, 2024 11:34 am
Forum: ESP-IDF
Topic: [Solved] Where to find the -IdfId of different esp-idf versions (used by the Initialize-Idf.ps1 script)
Replies: 3
Views: 1237

Re: Where to find the -IdfId of different esp-idf versions (used by the Initialize-Idf.ps1 script)

MicroController wrote:
Fri Jan 19, 2024 8:19 am
Looks like the IDs can be found in esp_idf.json in the IDF's root directory.
Thank you! Overlooked that. Did check the idf-env.json but not the esp_idf.json for some reason.
by oldndumb
Thu Jan 18, 2024 4:30 pm
Forum: ESP-IDF
Topic: [Solved] Where to find the -IdfId of different esp-idf versions (used by the Initialize-Idf.ps1 script)
Replies: 3
Views: 1237

Re: Where to find the -IdfId of different esp-idf versions (used by the Initialize-Idf.ps1 script)

Solved my issues for now by rerunning the esp-idf-tools-setup 'using existing ESP-IDF directory' with my old 4.4.4 install. Still would like to know where to find the IdfId to understand how I could setup and use Inialize-Idf.ps1 shortcuts to multiple idf versions myself though, without running the ...