| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			Guest
 
 
 
 
 
  
			
			
			
			
			
			
			
			
			
			
  
		  | 
		
			
				| warnings in ex_usb_serial | 
			 
			
				 Posted: Sun Feb 07, 2010 1:10 pm     | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Code: | 	 		  
 
/////////////////////////////////////////////////////////////////////////
 
////                                                                 ////
 
////                        ex_usb_serial.c                          ////
 
////                                                                 ////
 
 
Code deleted.
 
 
 | 	  
 
 
 
+++++++++++++++++++++++ 
 
Code deleted.
 
 
Reason: Forum Rule #10 
 
10. Don't post the CCS example code or drivers, or ask for such code and drivers. 
 
 
Forum Rules: 
 
http://www.ccsinfo.com/forum/viewtopic.php?t=26245 
 
 
-- Forum Moderator 
 
+++++++++++++++++++++++
 
 
 
I am getting the following warning messages while compilation process:
 
 
 Warning :Interrupts disabled during call to prevent re-entrancy: (usb_token_reset)
 
Warning :Interrupts disabled during call to prevent re-entrancy: (Usb_cdc_flush_out_buffer)
 
Warning :Interrupts disabled during call to prevent re-entrancy: (Usb_flush_out) | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		 | 
	
	
		  | 
	
	
		
			Guest
 
 
 
 
 
  
			
			
			
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 1:23 am     | 
				     | 
			 
			
				
  | 
			 
			
				| anyone plzzz solve my problem | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 1:36 am     | 
				     | 
			 
			
				
  | 
			 
			
				| If you have a problem with your code, you should tell about. The warning no problem. | 
			 
		  | 
	
	
		  | 
	
	
		
			Guest
 
 
 
 
 
  
			
			
			
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 1:42 am     | 
				     | 
			 
			
				
  | 
			 
			
				As I'm not using any Interrupts then I'm having Interrupts error.
 
Plzzz solve it. | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 1:49 am     | 
				     | 
			 
			
				
  | 
			 
			
				You apparently don't understand the difference between "error" and "warning".
 
 
By including usb_cdc.h in your application, you're actually using a lot of interrupts.
 
 
P.S.: The said warning is brought up by the simple fact, that three internal functions of the USB handler are 
 
called from an (USB related) interrupt function and also from the non-interrrupt code. Because the CCS compiler 
 
generally doesn't allow reentrant function calls, it inserts interrupt disables automatically and informs you about.
  Last edited by FvM on Mon Feb 08, 2010 1:56 am; edited 1 time in total | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 1:53 am     | 
				     | 
			 
			
				
  | 
			 
			
				Yes, you are using interrupts.
 
 
Your file above, ex_usb_serial.c, has this statement in it:
 
 	  | Code: | 	 		  | #include <usb_cdc.h>  | 	  
 
If you look in that file, you will see that it has this line in it:
 
 	  | Code: | 	 		  | #include <pic18_usb.h> | 	  
 
If you look in that file, you will see this code:
 
 	  | Code: | 	 		  
 
#int_usb NOCLEAR
 
void usb_isr() 
 
{
 
   int8 TRNAttempts;
 
   
 
   clear_interrupt(INT_USB);
 
.
 
.
 
.
 
.
 
 | 	  
 
So, you are using #int_usb interrupts.
 
 
Please take the time to read the 3 links that I gave you.  Ttelmah
 
explains it completely in those threads. | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 2:06 am     | 
				     | 
			 
			
				
  | 
			 
			
				If the term warning is causing you panic attacks, you can embed the usb_cdc.h reference by this text: 
 
 	  | Code: | 	 		  #ignore warnings 216
 
#include <usb_cdc.h>
 
#ignore warnings NONE | 	 
  | 
			 
		  | 
	
	
		  | 
	
	
		
			Guest
 
 
 
 
 
  
			
			
			
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 6:49 am     | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Code: | 	 		  
 
/////////////////////////////////////////////////////////////////////////
 
////                                                                 ////
 
////                        ex_usb_serial.c                          ////
 
////                                                                 ////
 
 
Code removed.
 
 | 	  
 
 
+++++++++++++++++++
 
Code Removed.
 
 
Reason: Forum Rule #10
 
 
10. Don't post the CCS example code or drivers
 
 
-- Forum Moderator
 
+++++++++++++++++++
 
 
i burnt it in 18F2550, then i connected it to my PC USB port "USB Device not Recongized"
 
now what should i do ?? | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Feb 08, 2010 10:34 am     | 
				     | 
			 
			
				
  | 
			 
			
				| Assuming you did not modify the original ex_usb_serial code (I didn't check for), then "Device not recognized" usually indicates a hardware problem. | 
			 
		  | 
	
	
		  | 
	
	
		
			bells_electronics
 
 
  Joined: 05 Dec 2009 Posts: 40
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed Feb 10, 2010 10:08 pm     | 
				     | 
			 
			
				
  | 
			 
			
				I have burnt the "ex_usb_serial code" in 18F2550 but its not working. 
 
I am using 20Mhz crystal + 2 - 15nf capacitors with 18F2550. 
 
pin 8 & 19 to GND
 
pin 20 to +5v
 
pin 1 to +5v via 10k resistor
 
pin 14 (VUSB) to +5v
 
 
pin 15 & 16 to USB connector -D +D
 
 
I am not using any external power supply, taking +5v from USB. | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Thu Feb 11, 2010 12:35 am     | 
				     | 
			 
			
				
  | 
			 
			
				Hopefully not 15nf capacitors. Should be 15 pF. In any way, it's good to check, that the processor code is 
 
actually running, e.g. by blinking a LED. 
 
 
It's not correct to connect pin14 (VUSB) to the 5V bus voltage. The node name is probably misleading. It's the output 
 
of an internal 3.3V regulator, it has to be bypassed by a .22 uF ceramic capacitor (I'm using 1 uF). A sufficient reason 
 
to make your application fail. Consult the datasheet chapter 17.2 USB Status and Control for details.
 
 
All other connections are apparently correct. You may want to double check the correct connection of D- and D+ 
 
to the USB. Reversal of these is a popular method to prevent USB operation. | 
			 
		  | 
	
	
		  | 
	
	
		
			bells_electronics
 
 
  Joined: 05 Dec 2009 Posts: 40
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Thu Feb 11, 2010 1:28 am     | 
				     | 
			 
			
				
  | 
			 
			
				After doing all the corrections now I am with “Found new hardware CCS RS232 Demo" finally i managed to install the driver,
 
then i opened the HyperTerminal window & got the following message in the hyperterminal  window
 
 
Port Settings
 
Bits per second: 2400
 
Data bits: 8
 
Parity: None
 
Stop bits: 1
 
Flow control: Hardware
 
these settings r correct ???
 
 
" CCS CDC (Virtual RS232) Example  "
 
 
now what should i do further ?? | 
			 
		  | 
	
	
		  | 
	
	
		
			FvM
 
 
  Joined: 27 Aug 2008 Posts: 2337 Location: Germany 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Thu Feb 11, 2010 2:42 am     | 
				     | 
			 
			
				
  | 
			 
			
				 	  | Quote: | 	 		  | what should i do further  | 	  
 
Depends on what you try to achieve...
 
 
 	  | Quote: | 	 		  | " CCS CDC (Virtual RS232) Example " | 	   
 
ex_usb_serial.c sends this message to the hardware RS232, not the virtual port, check the apllication source.
 
Apparently you connected Hyperterminal to the hardware RS232 (e.g. COM1). You have to identify the virtual COM 
 
port created by the USB driver and connect to it. If you don't want to browse the Windows registry, you can find 
 
it in the Windows device manager. | 
			 
		  | 
	
	
		  | 
	
	
		
			bells_electronics
 
 
  Joined: 05 Dec 2009 Posts: 40
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Thu Feb 11, 2010 2:57 am     | 
				     | 
			 
			
				
  | 
			 
			
				In my laptop I have no physical com port,
 
in Device manager it says  "USB to UART(COM3)".
 
If I type any char it will return that char but I am not able to type anything in hyperterminal. The cursor just blinks.
 
 
When I click on hyperterminal a window appears "connecting using: com3".
 
After that "com3 setting" window comes up, saying:
 
Bits per second: 2400 
 
Data bits: 8 
 
Parity: None 
 
Stop bits: 1 
 
Flow control: Hardware 
 
 
Then the message comes on the screen:
 
"CCS CDC (Virtual RS232) Example"
 
Then all three LEDs turn off.
 
Then if I disconnect hyperterminal the last LED turns ON. | 
			 
		  | 
	
	
		  | 
	
	
		 |