CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

USB_HID_CDC Problem [Solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
kmp84



Joined: 02 Feb 2010
Posts: 354

View user's profile Send private message

USB_HID_CDC Problem [Solved]
PostPosted: Thu Oct 31, 2019 4:20 am     Reply with quote

Hello,

I have strange problem with my last project. USB hid bootloader and CCS usb virtual comport. Bootloader work good, but after reboot and go to application for some usb ports and some PC usb cdc can't be enumerated and stay as hid input device in windows task manager.

Any suggestion?

Target: 18F24K50
CCS C ver.5.075

Best Wishes!


Last edited by kmp84 on Thu Oct 31, 2019 8:21 am; edited 1 time in total
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 5:22 am     Reply with quote

What's running on the PC ? Is it 100% dedicated to ONLY PIC development or used for 'everything', like internet, emails, games, eng pgms, etc. ?
If not dedicated, what 'autoupdate' programs are enabled ? Is it on a network ? What OS ? Wireless capable ? Only one USB port or more ?

I had a similar problem, nasty, as 'it worked minutes ago', now it doesn't. I never did find the culprit but some program or 'ap' had modified the parameters of the USB port I'd been using for months. Arrgh.

My 'PIC PC' is NOT connected to anything and only has PIC related programs on it. Also ALL 'autoupdate' options are disabled even though the PC cannot access the Internet.

Might not be your problem, but 'gremlins' are out there !
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 6:32 am     Reply with quote

Did you make any change to the clock setup when the main programs runs?

The device is dual powered or just USB powered?

Are you using USB_SENSE_PIN?

Are you calling usb_task() continuously in periods less than 10mS?
_________________
Electric Blue
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 6:38 am     Reply with quote

this description...
Quote:

Bootloader work good, but after reboot and go to application for some usb ports and some PC usb cdc can't be enumerated and stay as hid input device in windows task manager.
... implies it does work for SOME USB ports, so the PIC program does function properly. That's why I suggest it's a 'Windows / PC' side that's causing the problem.

Jay
kmp84



Joined: 02 Feb 2010
Posts: 354

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 6:39 am     Reply with quote

Hi mr "temtronic,

There is no programs. Just watching in windows 7,10 device manager.
kmp84



Joined: 02 Feb 2010
Posts: 354

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 6:42 am     Reply with quote

E_Blue wrote:
Did you make any change to the clock setup when the main programs runs?

The device is dual powered or just USB powered?

Are you using USB_SENSE_PIN?

Are you calling usb_task() continuously in periods less than 10mS?


1. NO.
2. Just USB Powered.
3. NO.
4.YES
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Thu Oct 31, 2019 7:03 am     Reply with quote

Is this PC connected to the Internet ?

Open USBView and compare the parameters of a working USB port versus a non working USB port.

If they are different, then some program has changed something for the nonworking USB port.

Can you confirm it DOES work on some USBports or does it NOT work for ANY USB port ?

Depending on PC and OS, USB 3.0 ports will not work as USB2.0 or USB1.0,1.1... yet another 'not backward compatible' issue.

Jay
kmp84



Joined: 02 Feb 2010
Posts: 354

View user's profile Send private message

USB_HID_CDC Problem Solved!
PostPosted: Thu Oct 31, 2019 8:21 am     Reply with quote

Hello all,

The problem is Solved! It was hardware problem! 4k7 res. connected between D+ and VUSB pins.

Sorry for my wrong and thanks for attention!


Best Wishes!
E_Blue



Joined: 13 Apr 2011
Posts: 417

View user's profile Send private message

PostPosted: Fri Nov 01, 2019 7:40 am     Reply with quote

Nice to know you got solved!

temtronic wrote:
this description...
Quote:

Bootloader work good, but after reboot and go to application for some usb ports and some PC usb cdc can't be enumerated and stay as hid input device in windows task manager.
... implies it does work for SOME USB ports, so the PIC program does function properly. That's why I suggest it's a 'Windows / PC' side that's causing the problem.

Jay


He stated that the bootloader works, but Doesn't the main program use its own USB program?
_________________
Electric Blue
temtronic



Joined: 01 Jul 2010
Posts: 9229
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Nov 01, 2019 8:51 am     Reply with quote

I read that the 'loader' and 'program' worked on 'some' USB ports but not all, which led me to conclude BOTH the bootloader AND application program did work. Based on that it seemed reasonable to think whatever USB ports the program doesn't work with, had 'issues'. There are differences both hard and soft between the various USB ports. I KNOW that a USB 3.0 flashdrive does NOT like to connect to a USB2.0 port on this PC (Win7). My quick, easy solution was to buy a USB2.0 flashdrive...works 100%...
Seems there was a hard issue, the 4k7 pullup....and at least he's 'up and running' !

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group