Page 1 of 1

How to use API for RF testing

Posted: Sat Sep 02, 2023 8:50 am
by gskjold
I am currently writing a RF testing firmware for our device before sending them to the lab. In my search I came across these functions in the API for this specific use: https://docs.espressif.com/projects/esp ... n.html#id1

However, when using these functions, the linker throws me an error:

Code: Select all

ld: main.c:9: undefined reference to `esp_phy_rftest_init'
This goes for any method in that header.. How can I fix this error?

My code:

Code: Select all

#define LOG_TAG "rftest"
#define LOG_LOCAL_LEVEL ESP_LOG_VERBOSE
#include "esp_log.h"
#include "esp_phy_init.h"
#include "esp_phy_cert_test.h"

void setup() {
    esp_wifi_power_domain_on();
    esp_phy_rftest_config(1); // Enable RF test mode
    esp_phy_rftest_init(); // Initialize RF test
    esp_phy_tx_contin_en(true); // Enable continuous mode
}


void app_main() {
    ESP_LOGD(LOG_TAG, "Booting");

    setup();
}

Re: How to use API for RF testing

Posted: Fri May 10, 2024 6:16 pm
by Bryght-Richard
For anyone else coming here from Google, I had to enable CONFIG_ESP_PHY_ENABLE_CERT_TEST to resolve the linker error.