Skip to content

Conversation

@roma-jam
Copy link
Collaborator

@roma-jam roma-jam commented Nov 28, 2024

Requirements

  1. When TU_LOG configured with value > 1 we need to provide correct name for TU_LOG_MEM() macros.
  2. This PR contain two small fixes, which are crucial for using device configuration with fully load EP amount.
    ESP32S2/S3 and ESP32P4.

Description

  1. Flushing _dcd_data.allocated_epin_count to zero while:
    • dcd_edpt_close_all() as we will allocate FIFO for EP0 later in dfifo_device_init(rhport);
    • handle_bus_reset(uint8_t rhport) as we will allocate FIFO for EP0 later in dfifo_device_init(rhport);
  2. Fix the usage of counters for TU_ASSERT. When we use _dwc2_controller instead of dwc2_controller we request the ep_in_count member value from the first member, which is FS. This is important, when we run on HS PHY.
  3. Changed _usbd_ctrl_buf -> _ctrl_xfer.buffer

Limitations

N/A

Breaking change

No breaking changes

Checklist

  • Pull Request name has appropriate format (for example: "fix(dcd_dwc2): Resolved address selection when several phy are present")
  • Optional: README.md updated
  • CI passing

Related issues

@roma-jam roma-jam force-pushed the fix/usbd_cleanup_dcd_fix_epin_counter branch from fc7303d to 8360b37 Compare November 28, 2024 11:06
@roma-jam roma-jam force-pushed the fix/usbd_cleanup_dcd_fix_epin_counter branch from 8360b37 to eb9539b Compare November 28, 2024 11:47
@roma-jam roma-jam changed the title fix(usbd_dcd_dwc2): Fixed epin counter assert, update buffer name for TU_LOG > 1 fix(usbd/dcd_dwc2): Fixed epin counter assert, update buffer name for TU_LOG > 1 Nov 28, 2024
@roma-jam roma-jam force-pushed the fix/usbd_cleanup_dcd_fix_epin_counter branch from 110de08 to 681b920 Compare November 28, 2024 12:12
@roma-jam roma-jam marked this pull request as ready for review November 28, 2024 12:26
Copy link
Collaborator

@tore-espressif tore-espressif left a comment

Choose a reason for hiding this comment

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

LGTM! We can tag a release after this is merged

@roma-jam roma-jam merged commit 58b8f1f into release/v0.17 Nov 28, 2024
70 checks passed
This was referenced Dec 11, 2024
@roma-jam roma-jam deleted the fix/usbd_cleanup_dcd_fix_epin_counter branch January 17, 2025 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants