CDC Class added to USB Device Library!

General discussion on Libstock website & codes posted on this website.
Author
Message
PogliottiIXLA
Posts: 3
Joined: 25 Sep 2015 15:16

Re: CDC Class added to USB Device Library!

#46 Post by PogliottiIXLA » 25 Sep 2015 15:57

Hi Marina,
i developed an application using LCD mikromedia board for STM32(STM32F407VGT6).
The LCD board must be connected to a embedded PC with Win7 Embedded Standard 64 bit.(attached screenshot)
When i try to install the driver provided with the library (in the example folder VCPDriver) driver installation fails (attached screenshot) and COM is not installed.
The error refer about INF file invalid.
If i connect the LCD and install the driver over my laptop with WIN7 Ultimate driver installation is correct and COM port is mounted and all work :?

Can you help me?
There is any other version of these drivers.
It is possible have the source of driver for debug the error?

Thanks
Regards
Riccardo
Attachments
Embedded_PC_Model.jpg
Embedded_PC_Model.jpg (48.74 KiB) Viewed 49393 times
DriverInstallationFailure.jpg
DriverInstallationFailure.jpg (41.59 KiB) Viewed 49393 times

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: CDC Class added to USB Device Library!

#47 Post by biljana.nedeljkovic » 30 Sep 2015 16:02

Hello,

you should install all the necessary drivers as administrator if you use the Win7 or newer.
Right click on the icon -> Run as administrator.

Usually, that is the most common problem with the installation.

Best regards,
Biljana

PogliottiIXLA
Posts: 3
Joined: 25 Sep 2015 15:16

Re: CDC Class added to USB Device Library!

#48 Post by PogliottiIXLA » 30 Sep 2015 17:07

Hello Biljana,
I'm the only user and also the Administrator user on the embedded PC. Any other type of installation work fine: we install other devices on our Embedded PC for example a Smart Camera and a Barcode Reader.
For the Mikroe LCD board i don't have a setup.exe file for the installation so i don't know how run this installation as Amministator; this is the procedure:
-when i plug the LCD boad to USB port, Windows find the divice has a "Other device" named with the string insered in the FW:IxlaLDC (see attached screenshot InstallationStep1.JPG)
-Right Click on the device ->Update Driver Software
-i select the driver folder where i have copied the VPCDriver provided by the USB Library (see attached .zip) in the example folder VCPDriver.(see attached screenshot InstallationStep2.JPG)
installation start but then aborted with the message attached in my previous post.

This happen on our Embedded PC with os Window Embedded Standard installed; I also tried on another system with os Window XP Embedded installed with the same result.

As i wrote on my previous post the same procedure on a standard PC with os Win 7 Ultimate is completed with success and the LCD board is mounted as a COM8
The problem seems to be on Embedded version of Windows.
There are other files that are required to install the USB CDC device in addition to driver files in attached

Thanks for the support
Regards
Riccardo
Attachments
InstallationStep2.JPG
InstallationStep2.JPG (108.42 KiB) Viewed 49312 times
InstallationStep1.JPG
InstallationStep1.JPG (71.91 KiB) Viewed 49312 times
VCPDriver.zip
(6.41 KiB) Downloaded 982 times

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: CDC Class added to USB Device Library!

#49 Post by biljana.nedeljkovic » 01 Oct 2015 14:34

Hello,

can you please tell me what is the exact name of the hardware you use?

Regards,
Biljana

PogliottiIXLA
Posts: 3
Joined: 25 Sep 2015 15:16

Re: CDC Class added to USB Device Library!

#50 Post by PogliottiIXLA » 02 Oct 2015 08:05

Hi Biljana,
we use 2 type of Embbeded PC:
one is Advantech AIMB-213 with Intel® Atom® D525 on-board with 4GB RAM
the other one is IEI WAFER-BT -i1 with Intel® Celeron® J1900 on-board with 8GB RAM
You can find the datasheet in attached.

The operating system installed on both Embedded PC is:
Windows Embedded Standard with Service Pack 1

in both PC the installation problem occurs with the same messagge:
"Windows encountered a problem installing the driver software for your device"
"A service installation section in this INF file is invalid"
as show in the screenshot in my first post.

Regards,
Riccardo
Attachments
WAFER-BT-i1_UMN_v1.03.pdf
(3.44 MiB) Downloaded 947 times
AIMB-213_startup_manual_Ed-1_FINAL.pdf
(424.13 KiB) Downloaded 978 times

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: CDC Class added to USB Device Library!

#51 Post by biljana.nedeljkovic » 02 Oct 2015 12:21

Hello,

I believe you have talked to my colleague via ticket. I suggest to continue the communication that way.


Best regards,

M4croC
Posts: 57
Joined: 05 Oct 2015 12:38

Re: CDC Class added to USB Device Library!

#52 Post by M4croC » 29 Aug 2016 21:53

Hey,
is there any example or documentation how to use that with PIC32MX2**? Which virtual address should be used for buffers, etc?

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: CDC Class added to USB Device Library!

#53 Post by biljana.nedeljkovic » 30 Aug 2016 11:11

Hi,

Depending on your MCU, you can run the VCP example from our USB Device Library.
Although it is not written for PIC32MX2xx you can modify the part with registers and USB interrupt pins, according to the datasheet.
http://ww1.microchip.com/downloads/en/D ... 01168F.pdf

Regards,
Biljana

M4croC
Posts: 57
Joined: 05 Oct 2015 12:38

Re: CDC Class added to USB Device Library!

#54 Post by M4croC » 30 Aug 2016 11:16

I've stuck with the following ccode:

Code: Select all


#include <stdint.h>

char buffer[64] absolute 0x600;
char aa[64];

char cnt;
char kk;

void interrupt(){
   USB_Interrupt_Proc();                   // USB servicing is done inside the interrupt
}

extern const uint8_t _USB_CDC_BULK_EP_IN; // Data interface IN endpoint
extern const uint8_t _USB_CDC_BULK_EP_OUT; // Data interface OUT endpoint
uint8_t dataReceived = 0;
uint16_t dataReceivedSize;

void USBDev_CDCDataReceived(uint16_t size){
dataReceived = 1;
dataReceivedSize = size;
}

void main(void){
  JTAGEN_bit = 0;        // Disable JTAG
  /* ADC Digital Mode */
  ANSELA = 0;
  ANSELB = 0;
  TRISA = 0;             // Initialize PORTA as output
  TRISB = 0;             // Initialize PORTB as output
  LATA = 0;              // Set PORTA to zero
  LATB = 0;              // Set PORTB to zero

  // Initialize CDC Class
  USBDev_CDCInit();

  // Initialize USB device module
  USBDev_Init();

// Wait until device is configured (enumeration is successfully finished)
  while(USBDev_GetDeviceState() != _USB_DEV_STATE_CONFIGURED)
  ;

  // Set receive buffer where received data is stored
  USBDev_CDCSetReceiveBuffer(buffer);

  // Infinite loop
  while(1){
        if(dataReceived == 1){
              dataReceived = 0;
              // Send back received packet
              USBDev_CDCSetReceiveBuffer(buffer);
              USBDev_CDCSendData(buffer, dataReceivedSize);
        }

        USBDev_CDCSendData("dasf", 10);///not work correct
        delay_ms(1000);
  }

}
The error message is:
4 304 virtual address expected: buffer
What does it means? I've tried different addresses but no luck

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: CDC Class added to USB Device Library!

#55 Post by biljana.nedeljkovic » 31 Aug 2016 10:24

Hi,

Check the Virtual Memory Map for your MCU, and used the virtual addresses for RAM, instead the address in Physical Memory.
http://ww1.microchip.com/downloads/en/D ... 01168J.pdf

Best regards,
Biljana

M4croC
Posts: 57
Joined: 05 Oct 2015 12:38

Re: CDC Class added to USB Device Library!

#56 Post by M4croC » 09 Sep 2016 09:49

The driver works on windows XP (installs and creates COM port without any problems) but it fails to install on Windows 8. What's wrong? The windows 8 says that it failed to add the driver (after I select the directory with inf file).

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: CDC Class added to USB Device Library!

#57 Post by Aleksandar.Mitrovic » 12 Sep 2016 14:21

Hi,

Have you tried to install it like administrator?
Can you attach here screen shot error message?

Kind regards,
Aleksandar

M4croC
Posts: 57
Joined: 05 Oct 2015 12:38

Re: CDC Class added to USB Device Library!

#58 Post by M4croC » 14 Sep 2016 04:02

Aleksandar.Mitrovic wrote: Have you tried to install it like administrator?
I think the devices manager is always run as administrator?
I have already installed several drivers like that with no problems...
Aleksandar.Mitrovic wrote: Can you attach here screen shot error message?
I have changed my OS language to English and here it is:
Attachments
3browsing.png
3browsing.png (43.62 KiB) Viewed 12188 times
2device.png
2device.png (61.49 KiB) Viewed 12188 times
1system.png
1system.png (21.78 KiB) Viewed 12188 times

M4croC
Posts: 57
Joined: 05 Oct 2015 12:38

Re: CDC Class added to USB Device Library!

#59 Post by M4croC » 14 Sep 2016 04:05

[SECOND POST BECAUSE I NEED MORE ATTACHMENTS]


I have also attached the driver I've used. It's from your package.
I was testing it with PIC16F1459 board and on other machine with XP or something it worked fine, same board, same driver, same firmware, other OS (I had some other issues but COM port appeared and received data).
Attachments
VCPDriver.zip
(6.5 KiB) Downloaded 278 times
5error.png
5error.png (24.2 KiB) Viewed 12188 times
4installing.png
4installing.png (9.89 KiB) Viewed 12188 times

User avatar
Aleksandar.Mitrovic
mikroElektronika team
Posts: 1697
Joined: 11 Mar 2015 12:48

Re: CDC Class added to USB Device Library!

#60 Post by Aleksandar.Mitrovic » 14 Sep 2016 16:55

Hi,

Which language pack do you have?
Have you tried to install drivers on some PC without language pack?

This drivers should work. Since I'm using them on Windows 7 without problems.

Kind regards,
Aleksandar

Post Reply

Return to “Libstock Discussion”