Skip to main content
jsalg.1
Associate II
August 5, 2024
Solved

EDT Display board is Not going for sleep mode when USB is connected (TinyUSB)

  • August 5, 2024
  • 2 replies
  • 1611 views

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 .

Best answer by jsalg.1

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. 

 

2 replies

ST Employee
August 6, 2024

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? 

jsalg.1
jsalg.1Author
Associate II
August 28, 2024

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 

ST Employee
August 29, 2024

Good to hear you're progressing.
Please do that 

Pavel A.
Super User
September 6, 2024

@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.

 

jsalg.1
jsalg.1AuthorBest answer
Associate II
September 16, 2024

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.