Changes in / [30:20]


Ignore:
Location:
/trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • /trunk/FirmwareFX2/dscr.a51

    r30 r20  
    315315        .db        <str1, >str1
    316316        .db        <str2, >str2
    317         .db        <str3, >str3
    318317_string_descriptors_end:
    319318
  • /trunk/FirmwareFX2/fx2/usb_common.c

    r30 r20  
    5252    current_config_descr  = high_speed_config_descr;
    5353    other_config_descr    = full_speed_config_descr;
    54     EP8AUTOINLENH = 0x02; SYNCDELAY;                            // Size in bytes of the IN data automatically commited (512 bytes here)
    55     EP8AUTOINLENL = 0x00; SYNCDELAY;                            // Can use signal PKTEND if you want to commit a shorter packet
     54        EP8AUTOINLENH = 0x02; SYNCDELAY;                                // Size in bytes of the IN data automatically commited (512 bytes here)
     55        EP8AUTOINLENL = 0x00; SYNCDELAY;                                // Can use signal PKTEND if you want to commit a shorter packet
    5656  }
    5757  else {
     
    6060    current_config_descr  = full_speed_config_descr;
    6161    other_config_descr    = high_speed_config_descr;
    62     EP8AUTOINLENH = 0x00; SYNCDELAY;                            // Size in bytes of the IN data automatically commited (64 bytes here)
    63     EP8AUTOINLENL = 0x40; SYNCDELAY;                            // Can use signal PKTEND if you want to commit a shorter packet
     62        EP8AUTOINLENH = 0x00; SYNCDELAY;                                // Size in bytes of the IN data automatically commited (64 bytes here)
     63        EP8AUTOINLENL = 0x40; SYNCDELAY;                                // Can use signal PKTEND if you want to commit a shorter packet
    6464  }
    6565
     
    289289
    290290      case RQ_SET_CONFIG:
     291        IOE &= ~(1 << 6);
    291292        _usb_config = wValueL;          // FIXME app should handle
    292293        break;
  • /trunk/FirmwareFX2/hw_basic.c

    r30 r20  
    8888  CPUCS = bmCLKOE | bmCLKSPD1;
    8989
    90   // put the system in FIFO mode by default
    91   // internal clock source at 48Mhz, drive output pin, synchronous mode
    92   // NOTE: Altera USB-Blaster does not work in another mode
     90  // Use internal 48 MHz, enable output, use "Port" mode for all pins
    9391  IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmIFCFG1 | bmIFCFG0;
    9492
  • /trunk/FirmwareFX2/usbjtag.c

    r30 r20  
    9494
    9595   // Make Timer2 reload at 100 Hz to trigger Keepalive packets
    96 
    9796   tmp = 65536 - ( 48000000 / 12 / 100 );
    9897   RCAP2H = tmp >> 8;
     
    102101
    103102   // Enable Autopointer
    104 
    105    EXTACC = 1;                                          // Enable
    106    APTR1FZ = 1;                                         // Don't freeze
    107    APTR2FZ = 1;                                         // Don't freeze
     103   EXTACC = 1;          // Enable
     104   APTR1FZ = 1;         // Don't freeze
     105   APTR2FZ = 1;         // Don't freeze
    108106
    109107   // define endpoint configuration
     
    130128   EP6CFG     = 0xA2; SYNCDELAY;                        // Out endpoint, Bulk, Double buffering
    131129   EP6FIFOCFG = 0x00; SYNCDELAY;                        // Firmware has to see a rising edge on auto bit to enable auto arming
    132    EP6FIFOCFG = bmAUTOOUT; SYNCDELAY;                   // Endpoint 6 used for user communicationn, auto commitment, 8 bits data bus
     130   EP6FIFOCFG = bmAUTOOUT | bmWORDWIDE; SYNCDELAY;      // Endpoint 6 used for user communicationn, auto commitment, 16 bits data bus
    133131
    134132   EP8CFG     = 0xE0; SYNCDELAY;                        // In endpoint, Bulk
    135133   EP8FIFOCFG = 0x00; SYNCDELAY;                        // Firmware has to see a rising edge on auto bit to enable auto arming
    136    EP8FIFOCFG = bmAUTOIN; SYNCDELAY;                    // Endpoint 8 used for user communication, auto commitment, 8 bits data bus
     134   EP8FIFOCFG = bmAUTOIN  | bmWORDWIDE; SYNCDELAY;      // Endpoint 8 used for user communication, auto commitment, 16 bits data bus
    137135
    138136   EP8AUTOINLENH = 0x00; SYNCDELAY;                     // Size in bytes of the IN data automatically commited (64 bytes here, but changed dynamically depending on the connection)
     
    145143   EP2BCL = 0x80; SYNCDELAY;                            // Arm EP4OUT by writing byte count w/skip.=
    146144   EP4BCL = 0x80; SYNCDELAY;
    147 
    148    PINFLAGSAB = 0xFA; SYNCDELAY;                         // 1111_1010 => FLAGA = EMPTY flag for EP6; FLAGB = FULL flag for EP8
    149 
     145   
     146   // JTAG from FX2 enabled by default
     147   IOC |= (1 << 7);
     148   
    150149   // Put the system in high speed by default (REM: USB-Blaster is in full speed)
    151150   // This can be changed by vendor commands
     
    399398  }
    400399 
     400  // change JTAG enable
     401  if (bRequest == 0x92)
     402  {
     403    if (wIndexL == 0)                  // FX2 is master of JTAG
     404    {
     405      IOC |= (1 << 7);
     406    }
     407    else                               // external connector is master of JTAG
     408    {
     409      IOC &= ~(1 << 7);
     410    }
     411  }
    401412  // change synchronous/asynchronous mode
    402   if (bRequest == 0x92)
     413  if (bRequest == 0x93)
    403414  {
    404415    if(IFCONFIG & bmASYNC)
     
    411422    }
    412423  }
    413 
    414   if (bRequest == 0x93) // change to synchronous mode
     424 
     425  if (bRequest == 0x94) // change to synchronous mode
    415426  {
    416427    IFCONFIG &= ~bmASYNC;
     
    434445    EP0BCH = 0;
    435446    EP0BCL = wLengthL;
     447//    EP0CS |= bmHSNAK; // Bram
    436448    return 1;
    437449  }
     
    448460  }
    449461 
     462  if (bRequest == 0x95) // For debugging purposes
     463  {
     464 
     465    SPI &= ~bmSS; // enable slave select
     466
     467    spi_write_byte_msb(wValueL); // address
     468    spi_write_byte_msb(wIndexL); // header
     469    EP0BUF[0] = spi_read_byte_msb(); // read back value from slave
     470   
     471    SPI |= bmSS; /* active low, disable slave */
     472   
     473    EP0BCH = 0;
     474    EP0BCL = 1; // Arm the EP
     475    return 1;
     476
     477    /*static xdata unsigned char buf[2];
     478    buf[0] = 0xFF;
     479    buf[1] = 0x10;
     480    spi_read(0x00, wValueL, SPI_FMT_HDR_1, wValueH, buf, 0);
     481    //spi_write_byte_msb(wValueL);
     482    EP0BUF[0] = 0x51;
     483    EP0BUF[1] = wValueL;
     484    EP0BCH = 0;
     485    EP0BCL = wLengthL;
     486    return 1;*/
     487  }
     488
    450489  if(bRequest == 0x90)
    451490  {
     
    463502  EP0BCH = 0;
    464503  EP0BCL = (wLengthL<2) ? wLengthL : 2; // Arm endpoint with # bytes to transfer
     504  //EP0CS |= bmHSNAK; // Bram
    465505
    466506  return 1;
     
    486526  usb_jtag_init();
    487527  eeprom_init();
    488   setup_autovectors();
    489   usb_install_handlers();
     528  setup_autovectors ();
     529  usb_install_handlers ();
    490530
    491531
  • /trunk/FirmwareFX2/usbjtag.hex

    r30 r20  
    150150:10E18400810240000007050202400000090401006A
    151151:10E1940002FFFFFF02070506024000000705880290
    152 :10E1A40040000003AEE1B4E1C2E10603000009044B
    153 :10E1B4000E0341006C0074006500720061001803D6
    154 :10E1C4005500530042002D0042006C0061007300B2
    155 :10E1D400740065007200120330003000300030001B
    156 :08E1E400300030003000300073
     152:10E1A40040000004B0E1B6E1C0E1D8E1060300009C
     153:10E1B40009040A03460059004E005500180355008F
     154:10E1C400530042002D0042006C0061007300740093
     155:10E1D400650072001203300030003000300030005F
     156:06E1E400300030003000A5
    157157:10085A00AA82E50D54FEFBB50D0280298A048C0597
    158158:10086A00E4620EED620FEB2400F582E43418F5839E
     
    168168:10090A00825017EA2402F582E434E1F583E0F582A5
    169169:10091A00C00212085AD0020A80E17486250DFAF53F
    170 :10092A0082C00212085A90E1B4E0F58212085AD045
    171 :10093A000290E1B4E02AFAF582C00212085A90E164
    172 :10094A00C2E0F58212085AD00290E1C2E02AF5828A
    173 :10095A0012085A90E1DAE0F58212085A7A0090E118
    174 :10096A00B4E0FBC3EA64808BF063F08095F0501723
    175 :10097A00EA24B4F582E434E1F583E0F582C0021298
    176 :10098A00085AD0020A80D77A0090E1C2E0FBC3EA93
    177 :10099A0064808BF063F08095F05017EA24C2F582E8
     170:10092A0082C00212085A90E1B6E0F58212085AD043
     171:10093A000290E1B6E02AFAF582C00212085A90E162
     172:10094A00C0E0F58212085AD00290E1C0E02AF5828E
     173:10095A0012085A90E1D8E0F58212085A7A0090E11A
     174:10096A00B6E0FBC3EA64808BF063F08095F0501721
     175:10097A00EA24B6F582E434E1F583E0F582C0021296
     176:10098A00085AD0020A80D77A0090E1C0E0FBC3EA95
     177:10099A0064808BF063F08095F05017EA24C0F582EA
    178178:1009AA00E434E1F583E0F582C00212085AD0020A63
    179 :1009BA0080D77A0090E1DAE0FBC3EA64808BF063C7
    180 :1009CA00F08095F05017EA24DAF582E434E1F583F1
     179:1009BA0080D77A0090E1D8E0FBC3EA64808BF063C9
     180:1009CA00F08095F05017EA24D8F582E434E1F583F3
    181181:1009DA00E0F582C00212085AD0020A80D77A00C310
    182182:1009EA00EA648094845017EA240EF582E434E1F52F
  • /trunk/PaellaBase/Paella.qsf

    r30 r20  
    138138set_location_assignment PIN_146 -to CON_B[14]
    139139set_location_assignment PIN_147 -to CON_B[15]
     140set_location_assignment PIN_148 -to CON_B[16]
    140141set_location_assignment PIN_149 -to CON_BCLK[0]
    141142set_location_assignment PIN_150 -to CON_BCLK[1]
     
    247248set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[14]
    248249set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[15]
     250set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[16]
    249251set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_BCLK[0]
    250252set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_BCLK[1]
  • /trunk/PaellaBase/Paella.v

    r30 r20  
    66                inout   wire    [3:0]   TRG,
    77                inout   wire    [6:0]   CON_A,
    8                 inout   wire    [15:0]  CON_B,
     8                inout   wire    [16:0]  CON_B,
    99                inout   wire    [12:0]  CON_C,
    1010                input   wire    [1:0]   CON_BCLK,
     
    3535                inout   wire    [7:0]   RAM_DQB
    3636        );
    37 
     37       
    3838        //      Turn off all output ports
    3939        assign  USB_SLRD        =       1'b0;
Note: See TracChangeset for help on using the changeset viewer.