XUD library has no choice for reset polarity

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
Carpentier
Member++
Posts: 31
Joined: Fri Aug 31, 2012 3:42 pm

XUD library has no choice for reset polarity

Post by Carpentier »

Hello,
I successfully use the sc_xud library with my own prototype card based on XS1-L2 processor and USB3300 usb phy coprocessor.
Unfortunately, the sc_xud , when instructed to control the device reset of the USB chip, use a active low reset, but the USB3300 has a active high reset.
Do someone know how it is possible to re-arrange for correct signal polarity.
Is it possible to pre-initialize a port to be inverted ie writing 1 produce a low output and writing 0 produce a high output.

Currently, i am forced to indicate a wrong port for reset as argument of XUD_Manager() initialization function, otherwise the USB3300 is improperly reset all time.


User avatar
segher
XCore Expert
Posts: 844
Joined: Sun Jul 11, 2010 1:31 am

Post by segher »

Have a look at set_port_inv(). You'll need to call it at the right time, of
course.
User avatar
Carpentier
Member++
Posts: 31
Joined: Fri Aug 31, 2012 3:42 pm

Post by Carpentier »

That's a very very good news for me. Thank you Segher.
Yes, i have opportunity of initializing the ports before i call XUD_Manager(..).
Now with your info, all is perfect for me.
Anyway i suspected something like that to exist.
I will try it quickly. Thank again.