I use the same bootloader and usb cdc to create a virtual com port in one of my project
using MC9s08JM60
work fine in windows xp did install provided driver that came with cmx usb stack
But when I take my project home using windows 7 x64 I can t install the driver
I have an inf i found in this forum
;------------------------------------------------------------------------------
; Freescale Semiconductor INC.
; Communication Device Class(CDC) INF File
;------------------------------------------------------------------------------
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%MANUFACTURER%
LayoutFile=layout.inf
;CatalogFile=%FILENAME%.cat
DriverVer= 6/2/2010,1.1.2600.3
[Manufacturer]
%MANUFACTURER%=DeviceList,NTamd64
[DestinationDirs]
DefaultDestDir=12
;------------------------------------------------------------------------------
; Windows 2000/XP/Vista32 Support
;------------------------------------------------------------------------------
[DriverInstall.nt]
include=mdmcpq.inf
CopyFiles=DriverCopyFiles.nt
AddReg=DriverInstall.nt.AddReg
[DriverCopyFiles.nt]
usbser.sys,,,0x20
[DriverInstall.nt.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[DriverInstall.nt.Services]
AddService=usbser, 0x00000002, DriverService.nt
[DriverService.nt]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\%DRIVERFILENAME%.sys
;------------------------------------------------------------------------------
; Windows Vista64 Support
;------------------------------------------------------------------------------
[DriverInstall.NTamd64]
include=mdmcpq.inf
CopyFiles=DriverCopyFiles.NTamd64
AddReg=DriverInstall.NTamd64.AddReg
[DriverCopyFiles.NTamd64]
%DRIVERFILENAME%.sys,,,0x20
[DriverInstall.NTamd64.AddReg]
HKR,,DevLoader,,*ntkern
HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[DriverInstall.NTamd64.Services]
AddService=usbser, 0x00000002, DriverService.NTamd64
[DriverService.NTamd64]
DisplayName=%SERVICE%
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\%DRIVERFILENAME%.sys
;------------------------------------------------------------------------------
; VID/PID Settings
;------------------------------------------------------------------------------
[SourceDisksFiles]
[SourceDisksNames]
[DeviceList]
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_AF0D
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_A506
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0010
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0020
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0120
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0024
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_AF0D
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_A506
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0010
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0020
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0120
%DESCRIPTION%=DriverInstall, USB\VID_15A2&PID_0024
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
[Strings]
FILENAME="FSL_cdc"
USB\VID_15A2&PID_0010.DeviceDesc="Freescale AN2295 Bootloader"
USB\VID_15A2&PID_0020.DeviceDesc="Freescale Communications Port"
USB\VID_15A2&PID_0120.DeviceDesc="Freescale ZSTAR Triaxial Demo"
USB\VID_15A2&PID_0024.DeviceDesc="Freescale ESTAR Triaxial Demo"
USB\VID_15A2&PID_AF0D.DeviceDesc="Freescale TWR-SENSOR Demo"
DRIVERFILENAME ="usbser"
MANUFACTURER="Juls Power"
INSTDISK="USB2UART"
DESCRIPTION="Freescale CDC Device"
SERVICE="Virtual Com Driver"
but when i point it to install my unknow device
it say it doesn t contain any compatible driver for my hardware
make sure its compatible with windows X64
Thanks
Solved! Go to Solution.
If found out for the cdc device
so ill post the info
I got vcp install in windows 7 x64 using this inf
as for the bootloader i think the supplied inf should work too but I still haven t try
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%ProviderName%
DriverVer=20/10/2010,1.0.0.0
[MANUFACTURER]
%ProviderName%=DeviceList, NTx86, NTamd64
[DeviceList.NTx86]
%Desc%=DriverInstall,USB\VID_C1CA&PID_0005
[DeviceList.NTamd64]
%Desc%=DriverInstall,USB\VID_C1CA&PID_0005
[DriverInstall]
include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=LowerFilterAddReg,SerialPropPageAddReg
[DriverInstall.Services]
include = mdmcpq.inf
AddService = usbser, 0x00000002, LowerFilter_Service_Inst
; This adds the serial port property tab to the device properties dialog
[SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Strings]
ProviderName = "Juls"
Desc = "JM60 Jul's Virtual Com Port"
Hi
It's me again
on the same topic
but not on the driver but to not spam the forum ill post in the same
Its a bridge between usb(CDC) and a serial port
currently running at 115200 baud
So my bus is at 24 mhz and baud divider set to 13
I have a rx interruption as follow:
//Uart as received a char put it in Buff_rx and inc nRx
interrupt void Uart1_RX(void)
{
char cStatus;
cStatus = SCI1S1;
//Read sci1d
Buff_rx[nRx] = SCI1D;
nRx++;
if(nRx == RX_BUFF_SIZE)
nRx = 0;
//SCI1S2_RXEDGIF = 1; //Clear edge detection int
}
And with this when the device send me data I may get overrun on my serial port
anyone got an idea to avoid overrun?
Hi Juls,
This may not be your problem, but I had an overrun problem with the SCI as well.
Are you using parity? Or the ninth data bit? I notice that you are not reading the SCI1C3 register.
I was using 8-bit data, and when I enabled parity on the SCI, the receiver-full flag would not clear, causing overrun errors. It turns out that when you enable parity, the SCI treats it as 9-bit data and requires that the SCI1C3 register is read prior to reading the SCI1D register. Here is a misleading portion from the manual:
When reading 9-bit data, read R8 before reading SCIxD because reading SCIxD completes automatic flag clearing sequences which could allow R8 and SCIxD to be overwritten with new data.
It does not state, however, that reading the SCI1C3 is required in order to clear the receiver flag any time there is more than 8 bits of data, regardless if you want that extra bit (as in the case of parity).
Hi
Im not using parity
here is my config
/* SCI1C2: TIE=0,TCIE=0,RIE=0,ILIE=0,TE=0,RE=0,RWU=0,SBK=0 */
SCI1C2 = 0x00; /* Disable the SCI1 module */
(void)(SCI1S1 == 0); /* Dummy read of the SCI1S1 registr to clear flags */
(void)(SCI1D == 0); /* Dummy read of the SCI1D registr to clear flags */
/* SCI1S2: LBKDIF=1,RXEDGIF=1,RXINV=0,RWUID=0,BRK13=0,LBKDE=0,RAF=0 */
SCI1S2 = 0xC0;
/* SCI1BDH: LBKDIE=0,RXEDGIE=0,SBR12=0,SBR11=0,SBR10=0,SBR9=0,SBR8=0 */
SCI1BDH = 0x00;
/* SCI1BDL: SBR7=0,SBR6=0,SBR5=0,SBR4=0,SBR3=1,SBR2=1,SBR1=0,SBR0=1 */
SCI1BDL = 0x0D;
/* SCI1C1: LOOPS=0,SCISWAI=0,Rsrc=0,M=0,WAKE=0,ILT=0,PE=0,PT=0 */
SCI1C1 = 0x00;
/* SCI1C3: R8=0,T8=0,TXDIR=1,TXINV=0,ORIE=1,NEIE=1,FEIE=1,PEIE=1 */
SCI1C3 = 0x2F;
/* SCI1C2: TIE=0,TCIE=0,RIE=1,ILIE=0,TE=1,RE=1,RWU=0,SBK=0 */
SCI1C2 = 0x2C;
SCI1BD=13; //115200 = 13 19200 = 78 Can be change by the application
ill try to read s3 too just to test
when the communication is low everything is fine
but as soon the device try to send more than 20 char back to back I get overrun error
Juls wrote:when the communication is low everything is fine but as soon the device try to send more than 20 char back to back I get overrun error
Then maybe it is time to count cycles. How does it work at 9600 baud?
At 115.2 kBaud, a byte will arrive every 87 microseconds. Do you know how long your receiver ISR takes to run? Do you have any interrupt service routines that may be blocking the receiver ISR? Are interrupts disabled for any reason?
It sounds like you are getting real overruns, and the code needs to be optimized.
Ill post my code tommorow
the other interrupt use is the usb one (and have more priority)
it is the cdc from cmx usb stack
didn t try at 9600
Here my code
Note rename my attachement to rar to unrar it
i got it working into windows 7
but i get this problem using XP
Hi
Ive just tested something using this code
I did connect my cpu sci port to another usb to serial device (based on ftdi232r)
using 2 hyper terminal I send a binary file at 115200 without overrun
Could it be hyperterm having a little pause between char?
or could it be something related to baudrate?
24Mhz divided by 13 is 115300 I think
Another test here
not connecting my cpu to the usb port
I do not get overrun when the device is spamming my sci port
so make me think its do to not being fast enough processing the usb interrupt
someone think its possible to optimize that part?
Hi
Just check RX while using windows hyper terminal
Sending a text file at 115200 baud work without overrun
but character are spaced by a pause of about 165uSec
When I connect my device there is no pause at all between character
that data burst can be 200ms long
Any idea on things to try??
or maybe I just can't do this?
Hello,
Facing a similar problem with WINDOWS 7 ....
CMX stack does not detect the JM32 MCU unlike the WINDOWS XP.Do we need to modify the .INF file...
pls advise
thank you,
Thyagaraj
Juls wrote:Ill post my code tommorow
the other interrupt use is the usb one (and have more priority)
it is the cdc from cmx usb stack
didn t try at 9600
If found out for the cdc device
so ill post the info
I got vcp install in windows 7 x64 using this inf
as for the bootloader i think the supplied inf should work too but I still haven t try
[Version]
Signature="$Windows NT$"
Class=Ports
ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
Provider=%ProviderName%
DriverVer=20/10/2010,1.0.0.0
[MANUFACTURER]
%ProviderName%=DeviceList, NTx86, NTamd64
[DeviceList.NTx86]
%Desc%=DriverInstall,USB\VID_C1CA&PID_0005
[DeviceList.NTamd64]
%Desc%=DriverInstall,USB\VID_C1CA&PID_0005
[DriverInstall]
include=mdmcpq.inf
CopyFiles=FakeModemCopyFileSection
AddReg=LowerFilterAddReg,SerialPropPageAddReg
[DriverInstall.Services]
include = mdmcpq.inf
AddService = usbser, 0x00000002, LowerFilter_Service_Inst
; This adds the serial port property tab to the device properties dialog
[SerialPropPageAddReg]
HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
[Strings]
ProviderName = "Juls"
Desc = "JM60 Jul's Virtual Com Port"