How to use API for RF testing

gskjold
Posts: 1
Joined: Sat Sep 02, 2023 8:38 am

How to use API for RF testing

Postby gskjold » Sat Sep 02, 2023 8:50 am

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();
}

Bryght-Richard
Posts: 40
Joined: Thu Feb 22, 2024 3:59 pm

Re: How to use API for RF testing

Postby Bryght-Richard » Fri May 10, 2024 6:16 pm

For anyone else coming here from Google, I had to enable CONFIG_ESP_PHY_ENABLE_CERT_TEST to resolve the linker error.

Who is online

Users browsing this forum: No registered users and 95 guests