-
Notifications
You must be signed in to change notification settings - Fork 33
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
feature(dcd_dwc2) : Added cache synchronization on esp32p4 while DMA is used #37
Conversation
8b93c5c
to
f4ffca9
Compare
a9acc7f
to
1f85a0e
Compare
1f85a0e
to
3fb9c86
Compare
6953f8e
to
3004b15
Compare
@tore-espressif @peter-marcisovsky DMA requires the specific configuration by esp-tinyusb component, so the link to the changes: espressif/esp-usb#88 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few work-in-progress comments/questions
@@ -848,6 +883,11 @@ static void handle_epout_dma(uint8_t rhport, uint8_t epnum, dwc2_doepint_t doepi | |||
|
|||
if (doepint_bm.setup_phase_done) { | |||
dma_setup_prepare(rhport); | |||
// CACHE HINT | |||
// When cache is enabled, _setup_packet must have cache line size alignment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the terminology used in this PR.
What does it mean 'cache is enabled'? We sure don't want to enable/disable the cache for all RAM access system wide...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It more like about the way, how we want to handle the memory. while DMA is used.
I thought, that there will be an option to choose between:
- Use cache and synchronize it explicitly in dcd_dwc2
- Bypass cache and use direct-access addresses
3fb9c86
to
d073592
Compare
0cb218d
to
650a55f
Compare
This PR is not relevant anymore, as the cache support were implemented in upstream based on the partial commit from here (hathach#2877) So far, temporary changes in class device (cdc and mscd) are not significant, as they will be covered by the merging the PR above. |
@roma-jam sorry for the late review, I see, it closed now.. |
Requirements
CFG_TUD_DWC2_DMA
and implementCFG_TUSB_MEM_SECTION
, refer feature(esp_tinyusb): Added mode configuration for dcd_dwc2 layer esp-usb#88)Measurements
Measurements were made on
tusb_msc
example (read-write operations benchmark, SDMMC target).ESP32S3
ESP32P4
*Benchmark results provided
Limitations
Not working:
recv_transfer_datagram_to_glue_logic()
)Working examples:
Breaking change
No breaking changes
Checklist
Related issues
No related issues