-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Renesas_RA: add support for board with HS USB port #2052
Conversation
Superb! Thank you for your PR. I am on vacation, and will check this out afterwards (~7 days) |
04afe0c
to
6ff62c0
Compare
Hi facchinm, Thanks for the PR. Is Host tested on RA6M5 with Highspeed module? I would like to take the reference for the same. |
@mcuenthusiast yes, the HS port has been tested in host mode too 🙂 |
Thanks @facchinm for quick response |
Should fix CI failure for Renesas RX family
Hi sorry for late response, this is still on my radar. I was trying to get an RA6M5 EK to test with. However, that would probably takes too long (since I still couldn't decide what other stuffs to bundle with). I will review this in the next couple of days and test it on the hardware later on. |
I have also tested this on Host USBFS on RA6M5(MSC file explorer example), It was working fine but sometimes It just gets stuck in below under function usbh_edpt_xfer_with_callback() // Attempt to transfer on a busy endpoint, sound like an race condition ! Any Idea what could be the reason or how could be be handled? any hints? |
update: I just ordered an rtthread HMI board https://www.cnx-software.com/2023/05/17/25-renesas-hmi-board-features-ra6m3-microcontroller-for-rt-thread-lvgl-development/ . It is a pre-order with a reasonable price (25$) + 4$ shipping. Athough it is RA 6M3 but also have HS USB as 6M5. They will start shipping from June 5, it is probably better to wait for the board so that I could actually do the testing with the HW. Of course, unless @facchinm would prefer to have it merged first. Let me know if it is blocking your any of work. Thank you for your patient. @mcuenthusiast rusb2 is a new port, It wouldn't be supprise to have bugs. I don't actually done much work/testing with it yet, and yes race condition can happen since it is the most occurred bug so far. Feel free to open an issue with detail of the bug so that we could fix it later |
Thanks for the response @hathach , will open the bug with more information, I also have one more issue with this port. It will be great if you could guide me in understanding if it is actually the issue or not that before I open the issue. Issue :- While sending the first command from msch_xfer_cb - case MSC_STAGE_CMD :- I am getting the stall response. and receiving the NRDY interrupt status. This happens when I running the code on IAR, where as in e2studio with same code I don't have problem. I just want to understand if this could be any compiler dependent issue or integration issue? |
@mcuenthusiast just open a new issue, we could discuss there. |
@mcuenthusiast in fact I've been only testing the patch on e2studio (gcc) |
__CCRX__ only applyes to version 4 of RX family compiler http://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/Compiler-CCRX.chm/Output/ccrx04c0201y.html __RX__ is one of the macros exported by latest gcc (gcc_8.3.0.202305_rx_elf)
Update fsp to 4.0.0
Since CFG_TUSB_RHPORT1_MODE is always defined now for backwards compatibility
76adeed
to
2b735ee
Compare
@hathach is there anything I can do to speedup the merge 🙂 ? |
@facchinm you have done wonderful works. Though since I am still waiting for rt-thread to ship my order. I haven't looked at this pr changes yet. I have asked them about the shipment (ETA is June 5th). If it is blocking your works. We could review it first and do the hand-on tests later on. Sorry for the delay so far. |
No worries, take your time 🙂 Thanks for the amazing work! |
good news, they already shipped my package, it will probably arrive in several days. |
update: package from rt-thread is still nowhere to be founnd. My exp with China ground postage is if it does not make it in a week or two, it will take a month or even two. I loose the patient and order an renesas 6m5 dev kit from digitkey, all thanks to Adafruit's sponsorship. Digikey has shipped my order, hopefully we could review/test/merge this next week. |
Now that the product is available we can also send you a Portenta C33 (just drop me an email 😉 ) |
sound great, I would love to test out C33 as well. What is your email, though. I can't find it in your profile. If you don't want to state it public, you could send me an email first, Mine is in github profile |
still reviewing and testing this, already complete with dcd test/update. Will start to test apply changes to hcd as well soon, though I am switched to other work atm (be back as soon as I could). Meanwhile @facchinm if you have some time, please comment on the above questions. |
Hi @hathach , sorry for disappearing but other releases + some vacation made my response running a bit late 🙂 |
@facchinm no problem at all, everyone is busy. In addition, I saw lots of new boards from Arduino within a very short time. It must be very crazy time for you. I will wrap up the hcd for ra and then make an PR for your review/regression soon. Thank you for the awesome work :) |
- make osal_task_delay() as weak function in usbh - implement osal_task_delay() in hcd rusb2 (may moved to other places)
- more clean up
…ck) does not seems to work
…wever usb still not work with uno
add BOARD_UPPERCASE for board detection
- remove ra from ci make build since it is already in cmake ci
Perfect, thank you for updating it here. @facchinm @iabdalkader let me know when you think this passes your test and good to merge. Meanwhile we should also wait for feedback from @kkitayam (original author of rusb driver) |
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.
perfect now, look good to me and ready to merge if everyone is happy.
perfect, thank you everyone for joining to make this PR possible. I am glad we finally merge it. Any issues could be addressed later with follow-up PRs. |
Describe the PR
Due to the upcoming Arduino Portenta C33, we'd like to mainline some of the work we've been doing to support the Renesas RA6M5 HS port. The board support packages will come in a subsequent PR.
Most of the changes should be 100% backwards compatible, except the need for the user to explicitly specify
CFG_TUSB_RHPORT0_MODE
(if the FS port is going to be used) orCFG_TUSB_RHPORT1_MODE
(for the HS port)I didn't find any way to add this information in the board.mk but I'm surely missing something, so any help is appreciated.
Additional context
/cc @iabdalkader for the Micropython port