2024-08-05 02:34 AM
Hi Team,
Currently I am working on project, in which we are using EDT Display board and project has been configured with TouchGFX. For one of our requirements, we have integrated TinyUSB. Most of the things working fine but facing one issue if USB is not connected device is not going for sleep mode. It will be remained in active mode. with USB cable connected, device is going for sleep mode after 15 mins. which is expected as for our project and that is how we configured sleep mode. I am seeking help to understand what the issue could be here?
Any insights? please response. Thanks in advance .
Solved! Go to Solution.
2024-09-16 04:02 AM
Finally, this issue got resolved. basically, issue was USB deinit was not implemented and not handled properly in the tinyUSB version (0.15.0) what I was using. I used latest tinyUSB version (0.17.0) which is released last week. with that everything working perfectly fine. thanks for all your feedback and responses.
2024-08-06 05:34 AM
Hello @jsalg.1,
I haven't worked with TinyUSB, so pardon my lack of knowledge about it. But, were you able to identify which function prevents the sleep mode to be activated?
Can't you set up an environment when you go to sleep mode? In other words, if there is no activity or touch for 15 mins, can't you call a function to disable the USB so sleep mode can happen?
2024-08-28 07:02 AM
Hello @Mohammad MORADI ESFAHANIASL ,
Thanks for reply, sorry for late update on this issue. actually, I was able to reproduce the issue. though I have not succeeded to fix the issue, but I narrowed down that, issue is with the way we handle buffer in our code. basically, display is getting hung when there is buffer to transfer and suddenly USB is disconnected and recontended. I am looking into TinyUSB code. If I get any leads on this, I will update in same thread
2024-08-29 05:18 AM
Good to hear you're progressing.
Please do that
2024-09-05 10:10 PM
I found root cause; issue is with USB. To support our project requirement, we have integrated tinyUSB (version 0.15.0). when there is Data to be sent on USB FIFO and suddenly USB disconnect and reconnect USB Interrupt handler behaving weird. it not coming out of Interrupt mode so Display task or any other task not getting chance to execute. I am not sure why it is so. do you have any input on using TinyUSB with STM32F7?
2024-09-06 04:59 AM
That's great to know!
Unfortunately, as I mentioned earlier, I have not worked with TinyUSB. But, I hope other members who have more experience with it can guide you.
Best regards,
2024-09-06 05:53 AM
@jsalg.1 I am not familiar with TinyUSB too, just a bit of common sense. If USB disconnects and the host noticed it, the device needs to go thru complete re-enumeration. If any data to be sent was pending, decide what to do: drop it or save and re-send when the connection comes up.
2024-09-16 04:02 AM
Finally, this issue got resolved. basically, issue was USB deinit was not implemented and not handled properly in the tinyUSB version (0.15.0) what I was using. I used latest tinyUSB version (0.17.0) which is released last week. with that everything working perfectly fine. thanks for all your feedback and responses.