Changes in / [20:30]


Ignore:
Location:
/trunk
Files:
17 added
7 edited

Legend:

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

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

    r20 r30  
    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);
    292291        _usb_config = wValueL;          // FIXME app should handle
    293292        break;
  • /trunk/FirmwareFX2/hw_basic.c

    r20 r30  
    8888  CPUCS = bmCLKOE | bmCLKSPD1;
    8989
    90   // Use internal 48 MHz, enable output, use "Port" mode for all pins
     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
    9193  IFCONFIG = bmIFCLKSRC | bm3048MHZ | bmIFCLKOE | bmIFCFG1 | bmIFCFG0;
    9294
  • /trunk/FirmwareFX2/usbjtag.c

    r20 r30  
    9494
    9595   // Make Timer2 reload at 100 Hz to trigger Keepalive packets
     96
    9697   tmp = 65536 - ( 48000000 / 12 / 100 );
    9798   RCAP2H = tmp >> 8;
     
    101102
    102103   // Enable Autopointer
    103    EXTACC = 1;          // Enable
    104    APTR1FZ = 1;         // Don't freeze
    105    APTR2FZ = 1;         // Don't freeze
     104
     105   EXTACC = 1;                                          // Enable
     106   APTR1FZ = 1;                                         // Don't freeze
     107   APTR2FZ = 1;                                         // Don't freeze
    106108
    107109   // define endpoint configuration
     
    128130   EP6CFG     = 0xA2; SYNCDELAY;                        // Out endpoint, Bulk, Double buffering
    129131   EP6FIFOCFG = 0x00; SYNCDELAY;                        // Firmware has to see a rising edge on auto bit to enable auto arming
    130    EP6FIFOCFG = bmAUTOOUT | bmWORDWIDE; SYNCDELAY;      // Endpoint 6 used for user communicationn, auto commitment, 16 bits data bus
     132   EP6FIFOCFG = bmAUTOOUT; SYNCDELAY;                   // Endpoint 6 used for user communicationn, auto commitment, 8 bits data bus
    131133
    132134   EP8CFG     = 0xE0; SYNCDELAY;                        // In endpoint, Bulk
    133135   EP8FIFOCFG = 0x00; SYNCDELAY;                        // Firmware has to see a rising edge on auto bit to enable auto arming
    134    EP8FIFOCFG = bmAUTOIN  | bmWORDWIDE; SYNCDELAY;      // Endpoint 8 used for user communication, auto commitment, 16 bits data bus
     136   EP8FIFOCFG = bmAUTOIN; SYNCDELAY;                    // Endpoint 8 used for user communication, auto commitment, 8 bits data bus
    135137
    136138   EP8AUTOINLENH = 0x00; SYNCDELAY;                     // Size in bytes of the IN data automatically commited (64 bytes here, but changed dynamically depending on the connection)
     
    143145   EP2BCL = 0x80; SYNCDELAY;                            // Arm EP4OUT by writing byte count w/skip.=
    144146   EP4BCL = 0x80; SYNCDELAY;
    145    
    146    // JTAG from FX2 enabled by default
    147    IOC |= (1 << 7);
    148    
     147
     148   PINFLAGSAB = 0xFA; SYNCDELAY;                         // 1111_1010 => FLAGA = EMPTY flag for EP6; FLAGB = FULL flag for EP8
     149
    149150   // Put the system in high speed by default (REM: USB-Blaster is in full speed)
    150151   // This can be changed by vendor commands
     
    398399  }
    399400 
    400   // change JTAG enable
     401  // change synchronous/asynchronous mode
    401402  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   }
    412   // change synchronous/asynchronous mode
    413   if (bRequest == 0x93)
    414403  {
    415404    if(IFCONFIG & bmASYNC)
     
    422411    }
    423412  }
    424  
    425   if (bRequest == 0x94) // change to synchronous mode
     413
     414  if (bRequest == 0x93) // change to synchronous mode
    426415  {
    427416    IFCONFIG &= ~bmASYNC;
     
    445434    EP0BCH = 0;
    446435    EP0BCL = wLengthL;
    447 //    EP0CS |= bmHSNAK; // Bram
    448436    return 1;
    449437  }
     
    460448  }
    461449 
    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 
    489450  if(bRequest == 0x90)
    490451  {
     
    502463  EP0BCH = 0;
    503464  EP0BCL = (wLengthL<2) ? wLengthL : 2; // Arm endpoint with # bytes to transfer
    504   //EP0CS |= bmHSNAK; // Bram
    505465
    506466  return 1;
     
    526486  usb_jtag_init();
    527487  eeprom_init();
    528   setup_autovectors ();
    529   usb_install_handlers ();
     488  setup_autovectors();
     489  usb_install_handlers();
    530490
    531491
  • /trunk/FirmwareFX2/usbjtag.hex

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

    r20 r30  
    138138set_location_assignment PIN_146 -to CON_B[14]
    139139set_location_assignment PIN_147 -to CON_B[15]
    140 set_location_assignment PIN_148 -to CON_B[16]
    141140set_location_assignment PIN_149 -to CON_BCLK[0]
    142141set_location_assignment PIN_150 -to CON_BCLK[1]
     
    248247set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[14]
    249248set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[15]
    250 set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_B[16]
    251249set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_BCLK[0]
    252250set_instance_assignment -name IO_STANDARD "3.3-V LVTTL" -to CON_BCLK[1]
  • /trunk/PaellaBase/Paella.v

    r20 r30  
    66                inout   wire    [3:0]   TRG,
    77                inout   wire    [6:0]   CON_A,
    8                 inout   wire    [16:0]  CON_B,
     8                inout   wire    [15: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.