cancel
Showing results for 
Search instead for 
Did you mean: 

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

jsalg.1
Associate III

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 .

1 ACCEPTED SOLUTION

Accepted Solutions

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. 

 

View solution in original post

7 REPLIES 7

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? 

Mohammad MORADI
ST Software Developer | TouchGFX

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 

Good to hear you're progressing.
Please do that 

Mohammad MORADI
ST Software Developer | TouchGFX

@Mohammad MORADI ESFAHANIASL  

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?

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,

Mohammad MORADI
ST Software Developer | TouchGFX
Pavel A.
Evangelist III

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

 

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.