Home
ThePod - USB debug adapter
Contents
1. value as an example Tera Term Pro can open only COM ports from 1 to 4 To assign a fixed COM port number proceed as follows Open the Device Manager in one of the following two ways a right click on My Computer icon select manage then click on Device Manager on the left pane b Open the Control Panel Start Settings Control Panel then select System and in the Hardware tab click on Device Manager Expand the Ports COM amp LPT entry Right click on ThePod Serial Port and select Properties Go to the Port Settings tab and click on Advanced Put the desired entry on COM Port Number see image below Advanced Settings for COM15 COM Port Number ae i OK USB Transter Sizes Cancel Select lower settings to corect performance problems at low baud rates Select higher settings for faster performance Recerve Bytes 4096 T Tranemit Bytes 4096 k Defaults BM Options Miscellaneous Options Select lower settings to corect response problems Serial E numerator Seral Printer Cancel lf Power Off Latency Timer msec 16 Timeout Event On Surprise Removal Set ATS On Close alme Eee TUE MS le E Disable Modem Ctrl At Startup Minimum rite Timeout msec 0 ZP Engineering srl ThePod_UM_v100 doc 6 15 ThePod User s Manual USB Debug Adapter Usage tips e Please note that to enable the serial port on ThePod some application must open the
2. Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 ret TPOD_Wr8 0 buff_out 2 TROD_CS_ AUTO Parameters Input index integer defines which thePod interface you want to use Input buff array of byte word dword contains bytes to be sent to the device NB Don t exceed 16 Kb buffer size Input size integer defines buffer size always specified in bytes Input cs_mode char specifies CS mode The following values can be used define TPOD_CS AUTO define TPOD_CS_ MANUAL 0x0 Oxl1 SPI Read amp Write Functions Description Performs an SPI Write operation This function performs a single USB write operation transfer for the entire specified buffer If cs_mode is TPOD_CS AUTO the CS signal changes accordingly with the SPI mode selected in the TPOD_Open function only at begin and at end of the write block operation Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 ret TPOD_Wr8 0 buff_out 2 TROD_CS_ AUTO ZP Engineering srl ThePod_UM_v100 doc Parameters Input index integer defines which thePod interface you want to use Input buff array of byte word dword contains bytes to be sent to the device NB Don t exceed 16 Kb buffer size Input size integer defines b
3. Adapter Continue to follow the install wizard for ThePod Channel B and then for ThePod Serial Port see images below Found New Hardware Wizard This wizard helps you install software for ThePOD Channel B GI IF your hardware came with an installation CD SE o floppy disk insert it now What do vou want the wizard to do Install the software automatically Recommended Click Next to continue Found New Hardware Wizard This wizard helps you install software for ThePOD Serial Port GI If your hardware came with an installation CD SE o floppy disk insert it now What do vou want the wizard to do Install the software automatically Recommended Click Next to continue At this point installation is completed you should be able to see the following J Found New Hardware x fi Your new hardware is installed and ready to use ZP Engineering srl ThePod_UM_v100 doc 4 15 ThePod USB Debug Adapter SPI modes One of the strongest features of ThePod is the ability to work in all four SPI modes The usual terminology for SPI modes that was originated from Motorola data sheets is referring to two configuration bits User s Manual L SPI clock polarity 0 active HI 1 active LO _ SPI sampling phase 0 sample then shift 1 shift then sample leading to the following four allowed SPI modes D CDH A A Jt LPrrere O f i oH o WE
4. BEEPS IE ee Pe in A GanwaenlaA mp IMO CI Sample on 0 0 0 Falling edge Rising edge 1 0 1 Rising edge Falling edge LO 2 1 0 Rising edge Falling edge HI 3 1 1 Falling edge Rising edge HI CLOCK CYCLE et Sie Pete a tT et NUMBER SPI mode 0 SCK CPOL 0 SPI mode 2 pean CPOL 1 MOSI F FROM MASTER MISO FROM SLAVE SPISS TO SLAVE UNDEFINED CLOCK CYCLE NUMBER SPI mode 1 SCK CPOL 0 SPI mode 3 SCK CPOL 1 MOSI FROM MASTER MISO FROM SLAVE SPISS TO SLAVE CPHA UNDEFINED ZP Engineering srl ThePod_UM_v100 doc 5 15 ThePod User s Manual USB Debug Adapter Change operating I O voltage Default I O voltage is set at 3 3 V at factory Please note that I O with the default setting is NOT 5 V tolerant If you need 5 V operating voltages on your target you must modify one jumper setting inside ThePod Follow these steps USB socket e open ThePod there are two screws C on the bottom of the case e locate JMP2 and follow the indications on PCB e place the jumper on pins 1 2 for 5V or on 2 3 for 3 3V All input output signals are affected by JMP2 position Forcing a fixed COM port As several USB to serial converters on the market COM port number is dynamically assigned and may vary with consecutive connections In some cases it is desirable to force the COM port number to a fixed
5. DLL at least once after connecting all outputs on ThePod are disabled after power up to ensure that no unwanted interaction happens with running targets e The API base library offers 8 bit transfers only to implement larger word widths you can use the block modes see TPOD_WrBIk8 TPOD_RdWrBIk8 functions In this way your custom application can easily implement 16 bit 24 bit 32 bit transfers in little endian and big endian modes e Single byte transfers on USB are not very efficient independently from SPI clock settings In order to get better performance it is necessary to use block transfers functions which encapsulate multiple bytes transfers into a single ThePod command such as TPOD_WrBIk8 and TPOD_RdWrBIk8 ZP Engineering srl ThePod_UM_v100 doc 7 15 ThePod User s Manual USB Debug Adapter API Reference A complete API reference is provided for the development of custom applications using ThePod The following functions are available TPOD_Open a TPOD_Close Utility TPOD_Ver TPOD_ConfigGPIO GPIO TPOD_SetGPIO TPOD_GetGPIO TPOD_SetCS Manual CS NRESET NREQ_ TPOD_SetCSAUX operations TPOD_SetNRESET TPOD_GetNREQ TPOD_Wr8 TPOD_WrBIk8 TPOD_RdWr8 TPOD_RdWrBlk8 SPI Read amp Write int WINAPI TPOD Open int index int spi_mode int cs_ sel int lsb unsigned short clk div Init function Input cs_sel integer defines the pin used
6. D_ERROR_SETDATABITS 8 define TPOD_ERROR_GETDATABITS 9 define TPOD_ERROR_SETCLKDIV 10 define TPOD_ERROR_FLUSH 11 define TPOD_ERROR_SETBITMODE 12 define TPOD_ERROR_CONFIG_GPIO 13 define TPOD_ERROR_SET_GPIO 14 define TPOD_ERROR_GET_GPIO 15 define TPOD_ERROR_WR8 16 define TPOD_ERROR_WRBLK8 17 define TPOD_ERROR_RDWR8 18 define TPOD_ERROR_RDWRBLK8 19 define TPOD_ALREADY_OPEN OxFO define TPOD_ERROR_MEMORY OxF1 define TPOD_ERROR_TIMEOUT OxF2 ZP Engineering srl via Ardito Desio 60 00131 ROME ITALY M LP Engineering tel 39 06 41230392 fax 39 06 41293033 A Hardware software and DSP design www zpeng com C ZP Engineering srl 2007 Specifications and appearance are subject to variations without notice ZP Engineering srl ThePod_UM_v100 doc 15 15
7. Example int ret ret TPOD_Ver version printf ThePod Library Version s n version ZP Engineering srl ThePod_UM_v100 doc Return integer TPOD_OK SUCCESS Parameters Output version string Enough memory must be allocated from the caller to store the library version string formatted as above 9 15 ThePod USB Debug Adapter User s Manual GPIO function Description Configures the selected custom GPIO pin as input or output Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Parameters Input index integer defines which thePod interface to use For more information see TPOD_Open function Example int ret ret TPOD_ConfigGPIO 0 TPOD_GPIO_0 TPOD_GPIO_OUTPUT ret TPOD_ConfigGPIO 0 TPOD_GPIO_1 TPOD_GPIO_INPUT Input gpio byte defines the GPIO pin The following values can be used define TPOD_GPIO_0O define TPOD_GPIO_1 0x0 Oxl1 Input mode byte defines GPIO mode input output The following values can be used define TPOD_GPIO_INPUT define TPOD_GPIO_OUTPUT 0x0 Ox1 GPIO function Description Changes the specified custom GPIO pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open
8. IO_LOW Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open function Input value byte defines pin level hi low Note when CS manual mode operation is the preferred way to access to target device remember to specify TPOD_CS_ MANUAL in the cs_mode parameter of read and write SPI functions ret TPOD_RdWr8 0 buff_out buff_in 2 TPOD_CS_ MANUAL ret TPOD_SetCS 0 TROD_GPIO_HI int WINAPI TPOD SetCSAUX int index unsigned char value Manual CS NRESET NREQ operations Description Changes CS auxiliary pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 ret TPOD_SetCSAUX 0 TPOD_GPIO_LOW Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open function Input value byte defines pin level hi low Note when CS manual mode operation is the preferred way to access to target device remember to specify TPOD_CS_ MANUAL in the cs_mode parameter of read and write SPI functions ret TPOD_RdWr8 0 buff_out buff_in 2 TPOD_CS_ MANUAL ret TPOD_SetCSAUX 0 TPOD_GPIO_HI ZP Engineering srl ThePod_UM_v100 doc 11 15 ThePod USB Debug Adapter User s Manual Manual CS NRESET NRE
9. Q operations Description Changes NRESET pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret Perform a cycle reset ret TPOD_SetNRESET 0 TPOD_GPIO_LOW Sleep 10 ret TPOD_SetNRESET 0 TPOD_GPIO_HI Parameters Input index integer defines which thePod interface you want to use Input value byte defines pin level hi low Manual CS NRESET NREQ operations Description Gets NREQ pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char value ret TPOD_GetNREQ 0O amp value printf NREQ Level d n value Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open function Output value byte it stores pin level 1 hi O low ZP Engineering srl ThePod_UM_v100 doc 12 15 ThePod USB Debug Adapter User s Manual SPI Read amp Write Functions Description Performs an SPI Write operation This function performs an USB write operation transfer for every single byte in the specified buffer If cs_mode is TPOD_CS_AUTO for every byte written the CS signal changes accordingly with the SPI mode selected in the TPOD_Open function Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes
10. ThePod USB Debug Adapter ThePod USB debug adapter Version 1 0 Released March 15 2007 User s Manual ThePod is a flexible USB device that offers a two wire UART interface at CMOS levels and a full featured SPI master SPI i interface SE MOSI SCLK CS CSAUX MISO It has been designed to provide a complete tool for in system programming and real time debug of embedded systems using microcontrollers DSP or FPGAs UART Special provisions are available for SPI slave booting of processors NRESET NREQ WAIT Additional applications for specific families can be download SOPO on the support web pages for ThePod No external power supply is required as ThePod draws its power from the USB interface Connector pinout L OS support Windows 2000 XP Vista Ce e oe RT baud rate 2400 320k bps GND GECI Pet 7 to target USB to host 5 www zpeng com thepod lt ThePod SPI activity A USB debug adapter ZP Engineering sri x z a We Latest documentation drivers and application software at vA ZP Engineering Hardware software and DSP design www zpeng com thepod ZP Engineering srl ThePod_UM_v100 doc 1 15 ThePod User s Manual USB Debug Adapter Installation ThePod requires the installation of three drivers channel A for SPI channel B for the serial port and a virtual COM port driver 1 Found New Hardware x Download the latest drivers
11. fine TPOD_CLKDIV_800_KHZ 0x0006 define TPOD_SPI_MODE_1 0x41 define TPOD_CLKDIV_750_KHZ 0x0007 define TPOD_SPI_MODE_2 0x42 define TPOD_CLKDIV_650_KHZ 0x0008 define TPOD_SPI_MODE_3 0x43 as Vis Il define TPOD_CLKDIV_91_5_HZ OxFFFF Example int main int ret ret TPOD_Open 0 TPOD_SPI_MODE_3 TPOD_CS_MAIN TPOD_MSB_FIRST TPOD_CLKDIV_1_MHZ if ret TPOD_OK printf TPOD_Open Error d n ret return 0 ZP Engineering srl ThePod_UM_v100 doc 8 15 ThePod USB Debug Adapter User s Manual Init function Description Closes the library It releases any resources allocated in the initialization see TPOD_Open and must be called at the end of operations Example int main int ret Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open function ret TPOD_Open 0 TPOD_SPI_MODE_3 TPOD_CS_MAIN TPOD_MSB_FIRST TPOD_CLKDIV_1_MHZ if ret TPOD_OK printf TPOD_Open Error d n ret return 0 ret TPOD_Close 0 if ret TPOD_OkK printf TPOD_Close Error d n ret return 0 printf nBye bye n return 0 Utility function Description Returns the version of library in the following format xx yy where xx is the major version and yy is the minor version
12. for the CS signal The following values can be used Description Initialize the library Must be called prior of any other define TPOD_CS MAIN 0x0 functions defined in this library define TPOD_CS AUX Oxi It allows to defines e SPI Mode Mode 0 Mode 1 Mode 2 Mode 3 Input Isb integer defines the byte order The following e Which pin used for CS Main or Aux values can be used e Byte order LSB or MSB first e SPI Clock range from 91 5 Hz to 3 MHz define TPOD_MSB_FIRST 0x0 define TPOD_LSB_FIRST Oxi Return integer TPOD_OK SUCCESS Input clk_div integer 16 bit defines the SPI clock otherwise FAIL please refers to section Error codes The values of clock is the result of the following formula SPI Clock 12MHz 1 clk_div 2 Parameters Input index integer defines which thePod interface The following values are already defined in the header you want to use Normally if you have only one thePod file connected to your host PC you must use index 0O If you have more than one thePod connected to your host PC define TRPOD_CLKDIV_6_MHZ 0x0000 please refers to section Using multiple thePod interface define TRPOD_CLKDIV_3_ MHZ 0x0001 define TPOD_CLKDIV_2_MHZ 0x0002 Input spi_mode integer defines the SPI Mode you define TPOD_CLKDIV_1_5_MHZ 0x0003 want to use The following values can be used define TPOD_CLKDIV_1_2_MHZ 0x0004 define TPOD_CLKDIV_1_MHZ 0x0005 define TPOD_SPI_MODE_O 0x40 de
13. from ThePod web site ThePod zF www zpeng com thepod and unzip the relevant files in a known location In the following screenshots the installation files are available in C prj thepod ThePod ZP Drivers 02 00 Then follow these steps e plug ThePod on any available USB port of your computer e follow the usual procedure for installing new hardware as in these screenshots Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking on Your computer on the hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software O Yes this time only Yes now and every time connect a device Click Next to continue Found New Hardware Wizard This wizard helps you install software for ThePOD Channel 4 IF your hardware came with an installation CD A or floppy disk insert it mow What do vou want the wizard to do Install the software automatically Recommended Click Next to continue ZP Engineering srl ThePod_UM_v100 doc 2 15 ThePod USB Debug Adapter Found New Hardware Wizard Please choose your search and installation options User s Manual Please indicate the folder where installation files have been unzipped Search for the best driver in these locations Use the chec
14. function Input gpio byte defines the GPIO pin Please see TPOD_ConfigGPIO function Input value byte defines pin level hi low The following values can be used define TPOD_GPIO_LOW 0x0 define TPOD_GPIO_HI Ox1 ret TPOD_ConfigGPIO 0 TROD_GPIO_0 TPOD_GPIO_OUTPUT ret TPOD_SetGPIO 0 TPOD_GPIO_0 TPOD_GPIO_HI GPIO function Description Gets the specified custom GPIO pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char value Parameters Input index integer defines which thePod interface you want to use For more information see TPOD_Open function Input gpio byte defines the GPIO pin Please see TPOD_ConfigGPIO function Output value byte it stores pin level 1 hi O low ret TPOD_ConfigGPIO 0 TROD_GPIO_1 TPOD_GPIO_INPUT ret TPOD_GetGPIO 0 TPOD_GPIO_1 amp value printf GPIO 1 Level d n value ZP Engineering srl ThePod_UM_v100 doc 10 15 ThePod USB Debug Adapter User s Manual int WINAPI TPOD SetCS int index unsigned char value Manual CS NRESET NREQ operations Description Changes CS main pin level Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 ret TPOD_SetCS 0 TROD_GP
15. k boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media floppy CO ROM Include this location in the search CAprivthepod T hePod ZF Drivers 02 00 Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware At the following question click on continue Hardware Installatio anyway a The software you are installing for this hardware ThePod Channel 4 has not passed Windows Logo testing to verity its compatibility with Windows F Tell me why this testing is important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for g ThePod Channel 4 Click Finish to close the wizard Cancel ZP Engineering srl ThePod_UM_v100 doc STOP Installation This completes the installation procedure for ThePod Channel A 3 15 ThePod User s Manual USB Debug
16. on Performs an SPI Read Write operation This function performs a single USB read write operation transfer for the entire buffer If cs_mode is TPOD_CS AUTO the CS signal changes accordingly with SPI mode selected in TPOD_Open function only at begin and end of the read write block operation Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 Parameters Input index integer defines which thePod interface you want to use Input buff_out array of byte word dword contains bytes to be sent to the device NB Don t exceed 16 Kb buffer size Output buff_out array of byte word dword It stores bytes to be received from the device NB Don t exceed 16 Kb buffer size Input size integer defines buffer size always specified in bytes Input cs_mode char specifies CS mode The following values can be used define TPOD_CS AUTO define TPOD_CS_ MANUAL 0x0 Ox1 ret TPOD_RdWrBIk8 0 buff_out buff_in 2 TROD_CS_ AUTO ZP Engineering srl ThePod_UM_v100 doc 14 15 ThePod User s Manual USB Debug Adapter Error Codes define TPOD_OK 0 define TPOD_ERROR_OPEN 1 define TPOD_ERROR_GETDEV 2 define TPOD_ERROR_CLOSE 3 define TPOD_ERROR_SYNC 4 define TPOD_ERROR_RDBLOCK 5 define TPOD_ERROR_WRBLOCK 6 define TPOD_ERROR_CONFIGSPI 7 define TPO
17. uffer size always specified in bytes Input cs_mode char specifies CS mode The following values can be used define TPOD_CS AUTO define TPOD_CS_ MANUAL 0x0 Ox1 13 15 ThePod USB Debug Adapter User s Manual SPI Read amp Write Functions Description Performs an SPI Read Write operation This function performs an USB read write operation transfer for every single byte in the specified buffer If cs mode is TPOD_CS_ AUTO the CS signal changes accordingly with the SPI mode selected in the TPOD_Open function for every byte of the specified buffer Return integer TPOD_OK SUCCESS otherwise FAIL please refers to section Error codes Example int ret unsigned char buff_out 2 buff_in 2 buff_out 0 0x30 buff_out 1 0x70 Parameters Input index integer defines which thePod interface you want to use Input buff_out array of byte word dword contains bytes to be sent to the device NB Don t exceed 16 Kb buffer size Output buff_out array of byte word dword It stores bytes to be received from the device NB Don t exceed 16 Kb buffer size Input size integer defines buffer size always specified in bytes Input cs_mode char specifies CS mode The following values can be used define TPOD_CS AUTO define TPOD_CS_ MANUAL 0x0 Oxl1 ret TPOD_RdWr8 0 buff_out buff_in 2 TROD_CS_ AUTO SPI Read amp Write Functions Descripti
Download Pdf Manuals
Related Search
Related Contents
Blackfin uClinux User Guide - Digi-Key Owner`s manual Chairman 2k/2s Series Five Genius Bus Controller User`s Manual Manual de instruções JVC SP-AP300 User's Manual Philips 19PFL4322 Flat Panel Television User Manual 下 の 原 ダ ム 再 開 発 導 水 施 設 実 施 設 計 業 務 取扱説明書 - SOOKI Copyright © All rights reserved.
Failed to retrieve file