Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esp_phy_ble_tx() occasional hang (IDFGH-12798) #13775

Open
3 tasks done
bryghtlabs-richard opened this issue May 10, 2024 · 0 comments
Open
3 tasks done

esp_phy_ble_tx() occasional hang (IDFGH-12798) #13775

bryghtlabs-richard opened this issue May 10, 2024 · 0 comments
Assignees
Labels
Status: Opened Issue is new Type: Bug bugs in IDF

Comments

@bryghtlabs-richard
Copy link
Contributor

bryghtlabs-richard commented May 10, 2024

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.1.2, 482a8fb

Espressif SoC revision.

ESP32-S3

Operating System used.

Windows

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

Custom board with esp32s3-wroom-1 and ESP32-S3-DevKitC-1 v1.1

Power Supply used.

Battery

What is the expected behavior?

esp_phy_ble_tx(tx_num_in > 0) should always return after transmitting tx_num_in test packets

What is the actual behavior?

Instead, it will sometimes hang, triggering a watchdog timeout

Steps to reproduce.

  1. Configure the radio for test mode, as the cert_test does
  2. Call esp_phy_ble_tx() many times
  3. Eventually it will hang
    ...

I was able to reproduce using cert_test by modifying cert_ble_tx():

void cert_ble_tx(void *arg)
{
    phy_ble_tx_s *cmd = (phy_ble_tx_s *)arg;

    esp_phy_test_start_stop(3); //I tried moving this into the loop, but it did not help
    while(true){
        esp_phy_ble_tx(cmd->txpwr, cmd->channel, cmd->len, cmd->data_type, cmd->syncw, cmd->rate, cmd->tx_num_in);
        vTaskDelay(3);
    }

    vTaskDelete(NULL);
}

To start the test, call esp_ble_tx -m 10. It will work many times, but eventually hang.

Debug Logs.

I (42720) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
I (42784) phy: TX done! 64
I (42788) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
I (42852) phy: TX done! 65
I (42856) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
E (52856) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (52856) task_wdt:  - IDLE (CPU 0)
E (52856) task_wdt: Tasks currently running:
E (52856) task_wdt: CPU 0: main
E (52856) task_wdt: CPU 1: IDLE
E (52856) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x42076022:0x3FCA06E0 0x420761CE:0x3FCA0700 0x4037B60D:0x3FCA0720 0x400559DD:0x3FCCDC20 |<-CORRUPTED
0x42076022: task_wdt_timeout_handling at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/task_wdt/task_wdt.c:461 (discriminator 3)

0x420761ce: task_wdt_isr at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/task_wdt/task_wdt.c:585

0x4037b60d: _xt_lowint1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:1240
I (71528) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
I (71592) phy: TX done! 65
I (71592) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
I (71656) phy: TX done! 64
I (71660) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
I (71724) phy: TX done! 65
I (71728) phy: ble_tx:pwr=8,chan=0,len=37,type=2,syncw=0x71764129,rate=0,txnum=100
E (81728) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (81728) task_wdt:  - IDLE (CPU 0)
E (81728) task_wdt: Tasks currently running:
E (81728) task_wdt: CPU 0: main
E (81728) task_wdt: CPU 1: IDLE
E (81728) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x42076022:0x3FCA06E0 0x420761CE:0x3FCA0700 0x4037B60D:0x3FCA0720 0x420EFCE8:0x3FCCDCF0 0x420EFFB2:0x3FCCDD10 0x420F0089:0x3FCCDDE0 0x420EDC02:0x3FCCDE10 0x42014441:0x3FCCDE40 0x4200DDC6:0x3FCCDE70 0x4211874F:0x3FCCDEB0 0x40387015:0x3FCCDEE0
0x42076022: task_wdt_timeout_handling at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/task_wdt/task_wdt.c:461 (discriminator 3)

0x420761ce: task_wdt_isr at C:/Espressif/frameworks/esp-idf-v5.1.2/components/esp_system/task_wdt/task_wdt.c:585

0x4037b60d: _xt_lowint1 at C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/xtensa_vectors.S:1240

0x420efce8: rw_evtv9_mgmt_fsm_print at ??:?

0x420effb2: rw_le_v9_testmode_tx at ??:?

0x420f0089: esp_ble_tx_func at ??:?

0x420edc02: esp_phy_ble_tx at ??:?

0x42014441: ui_FactoryTestEmissions_Poll at C:/Projects/ProjectName/ESP32/main/ui_events_factory_emissionstest.c:158

0x4200ddc6: app_main at C:/Projects/ProjectName/ESP32/main/spi_lcd_touch_example_main.c:344

0x4211874f: main_task at C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos/app_startup.c:208 (discriminator 13)

0x40387015: vPortTaskWrapper at C:/Espressif/frameworks/esp-idf-v5.1.2/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:162


### More Information.

For RF testing, our RF compliance test lab requires the device must function otherwise normally, with options to turn on/off RF test modes. When I call `esp_phy_ble_tx(tx_num_in=0)` the function never returns. So, I tried to call `esp_phy_ble_tx(tx_num_in > 0)` in our idle-loop, but sometimes it hangs. If there is a way to call `esp_phy_ble_tx(tx_num_in=0)` and return while still transmitting in test mode, that would be preferred.
@bryghtlabs-richard bryghtlabs-richard added the Type: Bug bugs in IDF label May 10, 2024
@espressif-bot espressif-bot added the Status: Opened Issue is new label May 10, 2024
@github-actions github-actions bot changed the title esp_phy_ble_tx() occasional hang esp_phy_ble_tx() occasional hang (IDFGH-12798) May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants