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 support@ccsinfo.com

warnings in ex_usb_serial
Goto page 1, 2  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








warnings in ex_usb_serial
PostPosted: Sun Feb 07, 2010 1:10 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sun Feb 07, 2010 6:17 pm     Reply with quote

These warnings are discussed by Ttelmah in the following threads:
http://www.ccsinfo.com/forum/viewtopic.php?t=32837
http://www.ccsinfo.com/forum/viewtopic.php?t=34264
http://www.ccsinfo.com/forum/viewtopic.php?t=36100
Guest








PostPosted: Mon Feb 08, 2010 1:23 am     Reply with quote

anyone plzzz solve my problem
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 1:36 am     Reply with quote

If you have a problem with your code, you should tell about. The warning no problem.
Guest








PostPosted: Mon Feb 08, 2010 1:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 1:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 1:53 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 2:06 am     Reply with quote

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








PostPosted: Mon Feb 08, 2010 6:49 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Feb 08, 2010 10:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Feb 10, 2010 10:08 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Feb 11, 2010 12:35 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Feb 11, 2010 1:28 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Feb 11, 2010 2:42 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Feb 11, 2010 2:57 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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