Skip to main content
Visitor II
November 28, 2007
Question

Problems with the USB initialization

  • November 28, 2007
  • 14 replies
  • 2945 views
Posted on November 28, 2007 at 06:58

Problems with the USB initialization

    This topic has been closed for replies.

    14 replies

    wolfenAuthor
    Visitor II
    August 6, 2007
    Posted on August 06, 2007 at 07:49

    sjo > OK now I see ;) I'm using Metrowerks CodeWarrior, so I don't use gcc as a compilator... The variable is declared with the u16 type only.

    ben_fnr > When I connect the card to the computer, my PC tells me it sees an unknown USB device... Else I don't know anything about this pull-up resistor :-? I need to get some information about this...

    I have another question : do I have to connect the interface to get the program working ? I think this may be a silly question, and I have tried before to execute the whole thing with and without the connection... But I have to be fixed :)

    Visitor II
    August 6, 2007
    Posted on August 06, 2007 at 08:02

    Yes you will need to connect the USB cable to a PC in order to get the software working. Make sure the STR7 is running before inserting the USB cable.

    The pull up resistor is used to indicated to the PC that a device has been inserted. It is possible that you can get away with not having one. Check the USB spec. If you connect the resistor between the USB D line (not sure which one) and a GPIO port you can fool the PC into thinking the USB device has been removed/inserted by pulling the line low or high without having to remove the cable.

    Ben

    wolfenAuthor
    Visitor II
    August 9, 2007
    Posted on August 09, 2007 at 08:18

    Another question : when I enable the interruptions, instead of staying around the while loop I am not been able to go out, sometimes the program seems to ''crash''. When I stop it during debug, I am into a list of dci instructions or andeq... That means the call of the interruptions is not done in the right place...

    What can be the cause of this ? A bad assignation of the memory ? A problem related to the clocks ? If I can avoid the modification of the .s files in ADS, I'll be happy :-]

    Seriously, this problem begins to be boring. I have taken the work of someone else, who was able in a few days to make the examples work, and I have not been able yet to do the same thing, I have taken some ''clean'' code from the ST website, and I can't see what is wrong...

    [ This message was edited by: Wolfen on 09-08-2007 11:51 ]

    Visitor II
    November 28, 2007
    Posted on November 28, 2007 at 06:58

    Wolfen,

    Is this problem already solved? And if so, what was the solution? I have a similar problem.

    Best regards,

    Louis XIV