Page 1 of 1

Help for USB

Posted: Thu Nov 28, 2013 10:23 pm
by HjH
Hallo,

Flowcode : 6.0.4.0
MCU : 24FJ64GB002
Tact : 32MHz
Communication: USB serial

- I wrote a small programm. You can see that in the attachment.
- I have the new USB-Treiber installed
- I open the "HyperTerminal" and can't open the virtual com

Can you urgently help me
Error_4.JPG
Error_4.JPG (17.9 KiB) Viewed 8751 times
Error_4.JPG
Error_4.JPG (17.9 KiB) Viewed 8751 times

Re: Help for USB

Posted: Fri Nov 29, 2013 11:44 am
by Benj
Hello,

What is Windows saying is the problem with the device if you double click the device in device manager?

The small yellow exclamation mark is normally related to a specific problem such as "Device cannot start" or "Device drivers not installed" etc.

Re: Help for USB

Posted: Fri Nov 29, 2013 11:27 pm
by HjH
Hello,

if I compile the programm with Flowcode 5 then works it correct. The same programm compiled with Flowcode 6 works not correct.

Re: Help for USB

Posted: Mon Dec 02, 2013 12:07 pm
by Benj
Hello,

In the v6 program the watchdog timer is enabled in the configuration settings, this will likely cause problems in the hardware and could be the cause of the yellow warning triangle you are seeing.

Re: Help for USB

Posted: Tue Dec 03, 2013 12:05 am
by HjH
Hello,

I checked my config1 and the watchdog timer is disable. I start the programm and the return of the step "USB_Serial1 Initialise" is not 255. In the Hyper Terminal I can't see the sendstring of USB. With other words the USB send nothing. The USB- Treiber ist the USB-Treiber of Flowcode5

Re: Help for USB

Posted: Tue Dec 03, 2013 10:59 am
by Benj
Hello,

Can you attach your current program with the current config setting and also please could you describe your hardware oscillator setup and I will do what I can to help.

Re: Help for USB

Posted: Fri Dec 06, 2013 12:18 am
by HjH
Hallo,

Flowcode : 6.0.4.0
MCU : 24FJ64GB002
Tact : 32MHz
Communication: USB serial

Configuration Einstellungen:
Config4 = 0xff18
Config3 = 0xf4ff
Config2 = 0x89af
Config1 = 0x3f7f
USB_Master_24FJ64GB002_Matrix.fcfx
(5.85 KiB) Downloaded 469 times

Re: Help for USB

Posted: Fri Dec 06, 2013 10:53 am
by Benj
Hello,

The Watchdog timer is still enabled in the config settings and should be set to disabled.
config.jpg
config.jpg (106.26 KiB) Viewed 8625 times
Is the LED toggling on and off on the hardware at the correct rate? I think you will have to setup the device to be running at 48MHz to work correctly for USB. If your crystal is 32MHz then you will need to change the config settings to use the external crystal with PLL and then change the dividor setting to give you the 96MHz output. If your using the internal oscillator then this should be the RC with PLL setting. Let me know which method you are using and I will help you to setup the program for the device so it runs at the correct speed for USB to work succesfully.

Re: Help for USB

Posted: Sat Dec 07, 2013 1:09 pm
by HjH
Hello,

I work with internal oscillator and the PLL mode. The Takt of the LED is 1Hz, this worked correctly.

If you start the "Project Option" the Watchdog Timer and other flag differ from the last modification without modifiation in the current session.

I checked the the configuration config1 to config4 in the C-code. The settings are in accordance with the data sheet. The Watchdog Timer is off.

If I may set the configuration as in Flowcode5 in the "use additional code" (ergänzenden Code benutzen) then I could take the code form Flowcode5. To the example: _CONFIG2(POSCMOD_XT & I2C1SEL_PRI & IOL1WAY_OFF & OSCIOFNC_ON & FCKSM_CSDCMD & FNOSC_FRCPLL & PLL96MHZ_ON & PLLDIV_NODIV & IESO_OFF). Then in Flowcode5 worked this code correct

Re: Help for USB

Posted: Sat Dec 14, 2013 5:10 pm
by HjH
Hello,
I believe Flowcode6 has a bug in the USB Serial, because I transfered the config settings in the Flowcode5 and with this the code run the programm correct.

Re: Help for USB

Posted: Tue Dec 17, 2013 9:27 pm
by Brendan
I'm not sure whether this will help, though I'd personally try a delay after initialising the USB block to guarantee reliable uninterrupted enumeration with the host before messaging. Perhaps you've already tried this?

Maybe this shouldn't make a difference between FC5 and FC6 but its simple to try and rule out if nothing else. If only I had a pound for every time I've heard "shouldn't" :roll: :D


All the best,

Brendan

Re: Help for USB

Posted: Wed Dec 18, 2013 7:31 pm
by HjH
Hello

I have insert a delay. The Hyper Terminal don't receive a message. Then I import the Flowcode5 programm in the Flowcode6. The result is the Hyper Terminal don't receive a message. From my view it cannot develop meaningfully the USB application in flowcode5. Therefor Flowcode6 was too expensive

I don't know what you mind with "If only I had a pound for every time I've heard "shouldn't" "