Conversation
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
hathach
left a comment
There was a problem hiding this comment.
thanks for your PR, I also have this board. I will try to troubleshoot it later. Just merge master to get ci passed.
|
Is it usable for the board in its current state? |
If you use it in device mode yes. |
|
Unfortunately I need Host mode:( |
|
As I can say, there are problems with the board itself. Even examples code sometimes doesn't work, because of the device's USB controller state. I think it breaks some state inside itself, that's why it happens. Only powering it off for ~10 seconds helps. I don't know why is that, but it's true. I can prove it on my board. |
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
|
Since hcd_dwc2 and usbh changes are generic I've excluded them from this PR, will address them separately. |
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
Signed-off-by: HiFiPhile <admin@hifiphile.com>
|
Been testing this on NUCLEO-H7S3L8 along with some of your DWC2 changes in separate PRs. I left some review comments on those other PRs, just minor things, but I wanted to also comment on this one and say thank you so much for the great work on H7S3L8 and DWC2. With a few tweaks for my specific requirements, it's working flawlessly and my basic CDC HS single endpoint setup is already hitting 18MB/s in a super quick benchmark task I wrote, with the only real optimisation I've had to do being changing the 512 byte buffers to 2kb! Excited to make some more tweaks and see how fast I can get it to go. The project I'm using this for is part of my final year project at university - and I had already wasted a lot of time with ST's USB stack before realising it was fundamentally broken and almost unusable (I think its interaction with the state machine is messed up or something) - so I cannot express my appreciation enough, these PRs have allowed me to escape ST's stack and move to TinyUSB, potentially saving my project 😄 |
|
Out of interest, have you happened to run your benchmarks (" I am primarily interested in the throughput I can get sending data from the board as device to the PC as host. I copied over your functions to expose the FIFOs and wrote something like: Since I'm just blasting data from the board as fast as possible, my Rx code is a bit different: It's C# but knowing the limitations of .NET's SerialPort I used Win32 interop/pinvoke for that part instead. I managed to hit ~25-26MiB/s on this Benchmark2, still with 2048 byte buffers. I get a slightly slower 23MB/s when using the following task (Benchmark1): So, I don't know if the approach exposing the FIFOs is inherently faster or if there's other factors (scheduler stuff) actually holding it back moreso than the cdc task implementation - the task priorities are also having a big impact (but I have some other stuff like a basic 1 second blink running also), so that would be another major external factor impacting speed. I don't really know what I'm doing to be honest and I am new to TinyUSB - I don't know if these numbers sound about right or if I should be able to achieve much higher numbers than this. Edit: perhaps this isn't the correct place for this discussion - if so, let me know and I can repost this in #920 instead. |
I haven't done it. I think your number is not bad, although maybe there are some chances of optimizations. tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c Line 428 in 3024bff |
WOAH That speed was achieved using just this simple task: While I quoted some speeds around 25-26MiB/s before, I think most of that was external factors (like other running tasks, or the configuration of my task that calls - gahbcfg |= GAHBCFG_TX_FIFO_EPMTY_LVL;
+ gahbcfg &= ~GAHBCFG_TX_FIFO_EPMTY_LVL;I immediately saw the throughput hover around 26-27 MiB/s. Although I noticed that my |
Yes cdc driver always copy the data so the source data variable doesn't need to be static. If you need more throughput you can copy the driver (or vendor class driver) and make adjustments then register it as a custom driver. |
hathach
left a comment
There was a problem hiding this comment.
perfect, hil server probably has some loose connection issue. I am current not at its place to re-connect. We can just merge this for now.

Describe the PR
Add NUCLEO-H7S3L8 support.
Status:
Host issues are generic and not limited to STM32H7RS and will be addressed separately
Detach is not detected, resulting_usbh_devicesoverflow.Can be fixed by add GINTSTS_DISCINT
Random assert inedpt_find_openedinhcd_edpt_xferSeems like when there are failed transfers events become mismatched. In the end a transfer is called with addr=1 but in received event addr=0.
Occasional assert
TU_ASSERT(ep_id < CFG_TUH_DWC2_ENDPOINT_MAX);with quickly connection/disconnection.A transfer with addr 0 finished after set address, maybe old transfer is not correctly aborted ?
tuh_descriptor_get_device(addr0...)when the port is bouncing, can be resolved by put_dev0.enumerating = 1;after debouncing delay, like inENUM_ADDR0_DEVICE_DESCAdditional context
Wasted 2 hours in EXTI as the offset in SVD file is wrong !
Corrected STM32H7S.svd.zip