I am interested in upgrading an HC11 application to the HCS12 platform.
The application communicates to the PC via the PC USB bus. The MC9S12UF32 has one reference design posted on the freescale website (USB to Memory Stick application) but there seems to be a lack of code or application examples to get a new user up and running, for example development kits and/or system USB demo source code examples. The Cypress EZ-USB FX2 uses an 8051 core and an integrated USB controller which decodes and encodes the serial data, performs error correction, bit stuffing, and other signaling-level details required by the USB, and ultimately transfers data bytes to and from the USB interface. The source code demo examples are reported to have a USB communication module running in hours, not weeks! Does anyone know of any app notes or demo examples for a USB application using the MC9S12UF32? And if I chose to migrate to the Cypress EZ-USB FX2 what are the problems of porting 12K of HC11 C code over to the Keil 8051 Compiler?? Janet |
|
Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series
Started by ●October 14, 2004
Reply by ●October 14, 20042004-10-14
If you have a working 68HC11 system, going to an 8051 just to get USB is likely to be a frustrating experience...one step forwards, two steps backwards. Another option you might want to consider. Use the 9S12, with the USB, but for prototypes (and maybe even early production) use the serial-to-USB chip from FTDI, www.ftdichip.com <http://www.ftdichip.com/> . Connect a serial port to the FTDI chip and get your application up and running. Stick in jumpers/resistors so that either the FTDI, or the native USB port on the 9S12, can alternatively be used. Design out the FTDI chip later on as a cost reduction. Best regards, Kerry Berland Silicon Engines 2101 Oxford Road 847-803-6860 Fax 847-803-6870 Des Plaines, IL 60018 USA -----Original Message----- From: Janet Lefko [mailto:] Sent: Thursday, October 14, 2004 11:17 AM To: Subject: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series I am interested in upgrading an HC11 application to the HCS12 platform. The application communicates to the PC via the PC USB bus. The MC9S12UF32 has one reference design posted on the freescale website (USB to Memory Stick application) but there seems to be a lack of code or application examples to get a new user up and running, for example development kits and/or system USB demo source code examples. The Cypress EZ-USB FX2 uses an 8051 core and an integrated USB controller which decodes and encodes the serial data, performs error correction, bit stuffing, and other signaling-level details required by the USB, and ultimately transfers data bytes to and from the USB interface. The source code demo examples are reported to have a USB communication module running in hours, not weeks! Does anyone know of any app notes or demo examples for a USB application using the MC9S12UF32? And if I chose to migrate to the Cypress EZ-USB FX2 what are the problems of porting 12K of HC11 C code over to the Keil 8051 Compiler?? Janet <http://us.ard.yahoo.com/SIG93a31vl/M15388.5497957.6576270.3001176/D=gr oups/S06554205:HM/EXP97860681/A#72354/R=0/SIGid813k2/*https:/www. orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click here <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=groups/S= :HM/A#72354/rand4817908 _____ > . |
Reply by ●October 14, 20042004-10-14
Thanks for your advice.
My initial design to turn over a quick USB solution was to interface the HC11 to the Silicon Labs UART to USB chip (CP2101). We are selling the product, but the data rate is limited by the serial interface. Both the CP2101 and the FTDI serial to USB chips are limited to ~1Mbps. The FTDI FT245BM with a parallel data bus advertises 1MByte/s if you modify their supplied DLL and APIs. My dilemma is that I'd rather go with a one chip USB / uP solution and use the full 12Mbps USB bandwidth. Janet Lefko Electrical Engineer Tekscan, Inc. 617 464-4500 x235 -----Original Message----- From: Kerry Berland [mailto:] Sent: Thursday, October 14, 2004 3:00 PM To: Subject: RE: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series If you have a working 68HC11 system, going to an 8051 just to get USB is likely to be a frustrating experience...one step forwards, two steps backwards. Another option you might want to consider. Use the 9S12, with the USB, but for prototypes (and maybe even early production) use the serial-to-USB chip from FTDI, www.ftdichip.com <http://www.ftdichip.com/> . Connect a serial port to the FTDI chip and get your application up and running. Stick in jumpers/resistors so that either the FTDI, or the native USB port on the 9S12, can alternatively be used. Design out the FTDI chip later on as a cost reduction. Best regards, Kerry Berland Silicon Engines 2101 Oxford Road 847-803-6860 Fax 847-803-6870 Des Plaines, IL 60018 USA -----Original Message----- From: Janet Lefko [mailto:] Sent: Thursday, October 14, 2004 11:17 AM To: Subject: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series I am interested in upgrading an HC11 application to the HCS12 platform. The application communicates to the PC via the PC USB bus. The MC9S12UF32 has one reference design posted on the freescale website (USB to Memory Stick application) but there seems to be a lack of code or application examples to get a new user up and running, for example development kits and/or system USB demo source code examples. The Cypress EZ-USB FX2 uses an 8051 core and an integrated USB controller which decodes and encodes the serial data, performs error correction, bit stuffing, and other signaling-level details required by the USB, and ultimately transfers data bytes to and from the USB interface. The source code demo examples are reported to have a USB communication module running in hours, not weeks! Does anyone know of any app notes or demo examples for a USB application using the MC9S12UF32? And if I chose to migrate to the Cypress EZ-USB FX2 what are the problems of porting 12K of HC11 C code over to the Keil 8051 Compiler?? Janet <http://us.ard.yahoo.com/SIG93a31vl/M15388.5497957.6576270.3001176/ D=gr oups/S06554205:HM/EXP97860681/A#72354/R=0/SIGid813k2/*https:/ www. orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click here <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=group s/S= :HM/A#72354/rand4817908 _____ > . click here <http://us.ard.yahoo.com/SIG9p2ce92/M15388.5497957.6576270.3001176/ D=groups/S06554205:HM/EXP97870649/A#72354/R=0/SIGid813k2/*htt ps:/www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F210 04SS <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=group s/S=:HM/A#72354/randF7627480 _____ > . |
|
Reply by ●October 14, 20042004-10-14
Janet--
Well, whichever chip set you use on the embedded side, be careful about your USB throughput expectations. No matter what you do on the embedded side, a PC will not give you anywhere close to a sustained throughput of 12 mbps, even though that is the raw USB full-speed data rate. How much you can actually get is a complex function of the USB hardware, USB drivers, Windows version, hardware on the host PC, etc., etc. There are some general discussions of this in Jan Axelson's book. Maybe someone else on this list can point to some concrete rules of thumb as to expected throughput for full-speed USB, end-to-end transfers, in a PC-to-embedded environment. Best regards, Kerry Berland Silicon Engines 2101 Oxford Road 847-803-6860 Fax 847-803-6870 Des Plaines, IL 60018 USA -----Original Message----- From: Janet Lefko [mailto:] Sent: Thursday, October 14, 2004 2:21 PM To: Subject: RE: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series Thanks for your advice. My initial design to turn over a quick USB solution was to interface the HC11 to the Silicon Labs UART to USB chip (CP2101). We are selling the product, but the data rate is limited by the serial interface. Both the CP2101 and the FTDI serial to USB chips are limited to ~1Mbps. The FTDI FT245BM with a parallel data bus advertises 1MByte/s if you modify their supplied DLL and APIs. My dilemma is that I'd rather go with a one chip USB / uP solution and use the full 12Mbps USB bandwidth. Janet Lefko Electrical Engineer Tekscan, Inc. 617 464-4500 x235 -----Original Message----- From: Kerry Berland [mailto:] Sent: Thursday, October 14, 2004 3:00 PM To: Subject: RE: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series If you have a working 68HC11 system, going to an 8051 just to get USB is likely to be a frustrating experience...one step forwards, two steps backwards. Another option you might want to consider. Use the 9S12, with the USB, but for prototypes (and maybe even early production) use the serial-to-USB chip from FTDI, www.ftdichip.com <http://www.ftdichip.com/> . Connect a serial port to the FTDI chip and get your application up and running. Stick in jumpers/resistors so that either the FTDI, or the native USB port on the 9S12, can alternatively be used. Design out the FTDI chip later on as a cost reduction. Best regards, Kerry Berland Silicon Engines 2101 Oxford Road 847-803-6860 Fax 847-803-6870 Des Plaines, IL 60018 USA -----Original Message----- From: Janet Lefko [mailto:] Sent: Thursday, October 14, 2004 11:17 AM To: Subject: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series I am interested in upgrading an HC11 application to the HCS12 platform. The application communicates to the PC via the PC USB bus. The MC9S12UF32 has one reference design posted on the freescale website (USB to Memory Stick application) but there seems to be a lack of code or application examples to get a new user up and running, for example development kits and/or system USB demo source code examples. The Cypress EZ-USB FX2 uses an 8051 core and an integrated USB controller which decodes and encodes the serial data, performs error correction, bit stuffing, and other signaling-level details required by the USB, and ultimately transfers data bytes to and from the USB interface. The source code demo examples are reported to have a USB communication module running in hours, not weeks! Does anyone know of any app notes or demo examples for a USB application using the MC9S12UF32? And if I chose to migrate to the Cypress EZ-USB FX2 what are the problems of porting 12K of HC11 C code over to the Keil 8051 Compiler?? Janet <http://us.ard.yahoo.com/SIG93a31vl/M15388.5497957.6576270.3001176/ D=gr oups/S06554205:HM/EXP97860681/A#72354/R=0/SIGid813k2/*https:/ www. orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click here <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=group s/S= :HM/A#72354/rand4817908 _____ > . click here <http://us.ard.yahoo.com/SIG9p2ce92/M15388.5497957.6576270.3001176/ D=groups/S06554205:HM/EXP97870649/A#72354/R=0/SIGid813k2/*htt ps:/www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F210 04SS <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=group s/S=:HM/A#72354/randF7627480 _____ > . <http://us.ard.yahoo.com/SIG9thac7o/M15388.5497957.6576270.3001176/D=gr oups/S06554205:HM/EXP97871732/A#72354/R=0/SIGid813k2/*https:/www. orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click here <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=groups/S= :HM/A#72354/rand2744028 _____ > . |
|
Reply by ●October 15, 20042004-10-15
Janet,
If you want full speed my guess is that a Motorola PowerPC is the only thing that will handle that, as for example MPC850 which I use in another application has software programmable serial ports one dedicated for USB with very elegant type of DMA which handle blocks of data of say 65K at up to 20M bits/second. This processor is not elegant at all it's quite a hard thing to get your head around to program I found, but there are ready to use at a cost operating systems for it. This would not be a quick solution at all though, and I have not worked with USB yet, but I am planning to use a CP2101 micro controller USB to UART http://www.silabs.com/ with my MC9S12 processor which is a nicely designed processor compared to strange 8051 or IBM R6000 in the PowerPC. Kerry Berland has already discussed a PC's limitations. Maybe 12X processor would be fast enough for your application? But don't be tempted to over specify what you want to do. I'll be interested to here how you get on. -- Andrew Lohmann AIIE Design Engineer PLEASE NOTE NEW EMAIL ADDRESS IS: Bellingham + Stanley Ltd. Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. Tel: +44 (0) 1892 500400 Fax: +44 (0) 1892 543115 Website: www.bs-ltd.com |
Reply by ●October 15, 20042004-10-15
> The FTDI FT245BM with a parallel data bus advertises 1MByte/s if you > modify their supplied DLL and APIs. > > My dilemma is that I'd rather go with a one chip USB / uP solution and > use the full 12Mbps USB bandwidth. Single chip solution sounds very well, UF32 is high speed USB device (480 Mbps vs 12Mbps 8-). But what about VID, PID, device driver, driver development time? That's a lot of money :-(. I'd really like to use UF32 for USB connection but above issues make me happy with D64+FT245BM solution. If design would require nothing else than mass storage - then yes, I'd try to get UF32 memstick refdesign and play . FT245BM is good for me. Drivers are available. D2XX drivers offer 1MBps transfer rates which is pretty close to max 12Mbps for full speed device. (Best USB 1.x memsticks provide ~700kBps rates. IMHO because of whole USB concept you should be happy with half of that :-). D2XX drivers can inform you if cable was disconnected or FT245BM was powered down. You can't get this info from VCP driver. And windows can get crazy (especially w98) if you try to send/read something to opened but disconnected device. FT245BM has 384bytes deep transmiter FIFO at MCU side and 128bytes at PC side. At first I was thinking that's enough and no software buffers required to send everything received via half loaded 1Mbps CAN BUS to PC. I was wrong. Because of latency times you should store tons of data in software FIFOs. Default latency timer value is 16ms (using D2XX driver you can shorten it down to 1ms). How many CAN messages can you receive in this time? Right, 200 and more, that's ~2kB. Also windows can't assure every 16ms USB hardware will be polled for presence of new data - 10kB FIFO could be safe probably... What 384bytes hardware FIFO could be useful for? With SCI operating at standard 115200bps in 16ms you can receive 16ms / (10/115200)~184 bytes. Double it to get ~safe buffer requirement - bingo, almost 384 bytes. USB is not fine, USB is not easy :-). Anyway design looks being successful and USB is only extra feature of it, used to replace SYSTEC USB<->CAN module. D64-FT245 hardware connection is very simple. No external bus, just whole PORT (PORTA because it's in zero page) for data and 4 another port lines for RD,WR,TXE, RXF, no interrupts because PC simply can't send if FIFO is full and MCU doesn't read from it. If you know something better than FTDI for quick start - let us all (HCS12'ers) know. Edward |
Reply by ●October 15, 20042004-10-15
I have read all your emails with interest. Our current USB design is HC11 interfaced to the CP2101 UART to USB Controller. The HC11 uP interface to the CP2101 is serial. I only send Tx, Rx and I'm done. There is no uP overhead. I used the E20 with a 14.756MHz clock, BAUD register = 0x00 - highest possible baud rate is crystal divided by 64, generating 230.4Kbps. I evaluated the FTDI series but chose the CP2101 because it has an internal crystal, internal EEPROM (for customer PID, VID) and is 5mm x 5mm (real estate is an issue on my board). I would have chosen the FTDI FT245 nevertheless, because the parallel interface would have been much faster, but I did not have a free port needed for bulk data transfer. Since Silicon Labs only offers virtual comm port drivers (VCP), and not files for direct USB communication, our PC SW engineer wrote his own driver and talks to the chip directly. The product is bus powered, eliminating a serial port or parallel port interface box + a power brick connector. We turned over the product in 3 months. (Truthfully, the FTDI application notes were better, so I took the best from both worlds.) The FTDI control/status lines would be essential for data rates that would require buffering. Data rates weren't a problem since the HC11 is so slow compared to a 30MHz bus on the HCS12. My data rate benchmark is 250,000 Bytes/s or 2.5Mbps. That's without overhead! I also failed to mention that our higher end products use the Cypress EZ-USB FX2. We already have the configuration code written for the integrated high level USB interface and a driver written from the Cypress tools. However, all our older legacy products are HC11 based. That's why I would prefer to go with a HCS12 solution!! But the code files for the MC9S12UF32 are low level and yes, our SW engineer would have to write a new driver. Right now, if I go with a HCS12 core and an external USB function chip, I would seriously consider the Cypress SL811 or EZ-USB SX2, but I haven't as yet ruled out the FTDI FT245BM. Thanks again for your input. Janet Lefko Electrical Engineer Tekscan, Inc. 617 464-4500 x235 -----Original Message----- From: Edward Karpicz [mailto:] Sent: Friday, October 15, 2004 4:37 AM To: Subject: RE: [68HC12] Motorola MC9S12UF32 USB Controller versus Cypress EZ-USB FX2 Series > The FTDI FT245BM with a parallel data bus advertises 1MByte/s if you > modify their supplied DLL and APIs. > > My dilemma is that I'd rather go with a one chip USB / uP solution and > use the full 12Mbps USB bandwidth. Single chip solution sounds very well, UF32 is high speed USB device (480 Mbps vs 12Mbps 8-). But what about VID, PID, device driver, driver development time? That's a lot of money :-(. I'd really like to use UF32 for USB connection but above issues make me happy with D64+FT245BM solution. If design would require nothing else than mass storage - then yes, I'd try to get UF32 memstick refdesign and play . FT245BM is good for me. Drivers are available. D2XX drivers offer 1MBps transfer rates which is pretty close to max 12Mbps for full speed device. (Best USB 1.x memsticks provide ~700kBps rates. IMHO because of whole USB concept you should be happy with half of that :-). D2XX drivers can inform you if cable was disconnected or FT245BM was powered down. You can't get this info from VCP driver. And windows can get crazy (especially w98) if you try to send/read something to opened but disconnected device. FT245BM has 384bytes deep transmiter FIFO at MCU side and 128bytes at PC side. At first I was thinking that's enough and no software buffers required to send everything received via half loaded 1Mbps CAN BUS to PC. I was wrong. Because of latency times you should store tons of data in software FIFOs. Default latency timer value is 16ms (using D2XX driver you can shorten it down to 1ms). How many CAN messages can you receive in this time? Right, 200 and more, that's ~2kB. Also windows can't assure every 16ms USB hardware will be polled for presence of new data - 10kB FIFO could be safe probably... What 384bytes hardware FIFO could be useful for? With SCI operating at standard 115200bps in 16ms you can receive 16ms / (10/115200)~184 bytes. Double it to get ~safe buffer requirement - bingo, almost 384 bytes. USB is not fine, USB is not easy :-). Anyway design looks being successful and USB is only extra feature of it, used to replace SYSTEC USB<->CAN module. D64-FT245 hardware connection is very simple. No external bus, just whole PORT (PORTA because it's in zero page) for data and 4 another port lines for RD,WR,TXE, RXF, no interrupts because PC simply can't send if FIFO is full and MCU doesn't read from it. If you know something better than FTDI for quick start - let us all (HCS12'ers) know. Edward click here <http://us.ard.yahoo.com/SIG9na94ed/M15388.5497957.6576270.3001176/ D=groups/S06554205:HM/EXP97915853/A#72354/R=0/SIGid813k2/*htt ps:/www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F210 04SS <http://us.adserver.yahoo.com/l?M15388.5497957.6576270.3001176/D=group s/S=:HM/A#72354/rand31929790 _____ > . |