Hi,
I would like to know what it is the best way to force a USB re-enumeration without reseting the XE216 ?
I try writing XS1_SU_PER_UIFM_FUNC_CONTROL_NUM register, but I would like to keep the XMOS USB interface in reset as long as my board initialization is not completed, and then release reset so the driver can start USB enumeration
Thanks
How to force USB re-enumeration on XE216?
-
- Active Member
- Posts: 44
- Joined: Fri Sep 15, 2017 2:58 pm
-
- XCore Expert
- Posts: 580
- Joined: Thu Nov 26, 2015 11:47 pm
Just a thought, if all you need to do is delay USB enumeration until the board initializes, could you put a little wait routine on the core that runs xud? or maybe one of the endpoint cores. Something like
obviously you will have to figure out what "init_done" means and how to determine it...
Code: Select all
on USB_TILE: { do{ /* nothing */ } while( !init_done ); xud(...); }
-
- Experienced Member
- Posts: 82
- Joined: Thu Apr 04, 2013 10:14 pm
akp wrote:Just a thought, if all you need to do is delay USB enumeration until the board initializes, could you put a little wait routine on the core that runs xud? or maybe one of the endpoint cores. Something like
I've used this approach on several products. Typically I use a global variable:Code: Select all
on USB_TILE: { do{ /* nothing */ } while( !init_done ); xud(...); }
unsigned g_wait = 0; while ( !g_wait) ;
...xud(...)
Another thread (core) writes a 1 to g_wait ( with asm stw...) when everything else is ready for USB enumeration to begin.
But the title and OP are about re-enumeration...? Or perhaps this is the info that the original poster needs.
-
- XCore Expert
- Posts: 580
- Joined: Thu Nov 26, 2015 11:47 pm
No, it doesn't answer the OP's question but it seems to provide the solution to the problem the OP described.
-
- Active Member
- Posts: 44
- Joined: Fri Sep 15, 2017 2:58 pm
Thanks for your suggestions but what I would like to do is to force host to enumerate my device without reset it.
Claire
Claire
-
- XCore Legend
- Posts: 1913
- Joined: Thu Jun 10, 2010 11:43 am