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

fix(esp_tinyusb): Uninstall TinyUSB driver while external task is using #115

Draft
wants to merge 2 commits into
base: feature/esp32p4_fs_phy_config
Choose a base branch
from

Conversation

roma-jam
Copy link
Collaborator

@roma-jam roma-jam commented Jan 15, 2025

Description

Fixed error when esp_tinyusb is configured with CONFIG_TINYUSB_NO_DEFAULT_TASK=y

Related

Prerequisites for dynamic TinyUSB configuration:

  • Selecting USB Peripheral
  • TinyUSB task configuring

Testing

Added three additional test applications for two parameters CONFIG_TINYUSB_NO_DEFAULT_TASK and CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK

Test Matrix:

  • Default Task (CONFIG_TINYUSB_NO_DEFAULT_TASK=n, CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK=n )
  • Default Task + Initialization in Task (CONFIG_TINYUSB_NO_DEFAULT_TASK=n, CONFIG_TINYUSB_INIT_IN_DEFAULT_TASK=y )
  • External Task (CONFIG_TINYUSB_NO_DEFAULT_TASK=y)

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@roma-jam roma-jam added this to the esp_tinyusb v1.7.0 milestone Jan 15, 2025
@roma-jam roma-jam self-assigned this Jan 15, 2025
@roma-jam roma-jam changed the base branch from master to feature/esp32p4_fs_phy_config January 15, 2025 20:48
@roma-jam roma-jam force-pushed the feature/tusb_task_test_apps branch from ac9b94c to bb9ab4a Compare January 15, 2025 21:29
}

/**
* @brief TinyUSB Teardown specific testcase
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase

}

/**
* @brief TinyUSB Teardown specific testcase
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase

/**
* @brief TinyUSB Teardown specific testcase
*
* Scenario:
Copy link
Collaborator Author

@roma-jam roma-jam Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Scenario:
* Scenario:
* 1. Install TinyUSB driver
* 2. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS
* 3. Wait TUSB_DEVICE_DELAY_MS
* 4. Teardown TinyUSB
* 5. Release resources

* 2. Create external TinyUSB task for tud_task()
* 3. Wait tud_mount_cb() for TUSB_DEVICE_DELAY_MS
* 4. Wait TUSB_DEVICE_DELAY_MS
* 5. Teardwon TinyUSB
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 5. Teardwon TinyUSB
* 5. Teardown TinyUSB

}

/**
* @brief TinyUSB Teardown specific testcase
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief TinyUSB Teardown specific testcase
* @brief TinyUSB Task specific testcase

/**
* @brief TinyUSB Teardown specific testcase
*
* Scenario:
Copy link
Collaborator Author

@roma-jam roma-jam Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Scenario:
* Scenario:
* 1. Install TinyUSB driver
* 2. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS
* 3. Wait TUSB_DEVICE_DELAY_MS
* 4. Teardown TinyUSB
* 5. Release resources

@@ -0,0 +1,16 @@
# Configure TinyUSB, it will be used to mock USB devices
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB

@@ -0,0 +1,16 @@
# Configure TinyUSB, it will be used to mock USB devices
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB

@@ -0,0 +1,16 @@
# Configure TinyUSB, it will be used to mock USB devices
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Configure TinyUSB, it will be used to mock USB devices
# Configure TinyUSB

* Scenario:
* 1. Install TinyUSB driver
* 2. Create external TinyUSB task for tud_task()
* 3. Wait tud_mount_cb() for TUSB_DEVICE_DELAY_MS
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 3. Wait tud_mount_cb() for TUSB_DEVICE_DELAY_MS
* 3. Wait tud_mount_cb() until TUSB_DEVICE_DELAY_MS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant