From add9393e78d004b403518a6602b8572feee5f890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Sat, 6 Sep 2008 12:09:00 +0000 Subject: [PATCH] set fixed frequency and print warning if a different frequency is requested git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1353 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 3 +++ jtag/src/tap/cable/usbblaster.c | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/jtag/ChangeLog b/jtag/ChangeLog index df2f8cc5..714d8e25 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,5 +1,8 @@ 2008-09-06 Arnim Laeuger + * src/tap/cable/usbblaster.c: set fixed frequency and print warning + if a different frequency is requested + * src/tap/cable/generic.c: fixed calibration loop * src/svf/svf.c: require frequency setting from cable for diff --git a/jtag/src/tap/cable/usbblaster.c b/jtag/src/tap/cable/usbblaster.c index 1cc73af3..ecda841c 100644 --- a/jtag/src/tap/cable/usbblaster.c +++ b/jtag/src/tap/cable/usbblaster.c @@ -50,6 +50,8 @@ #define TDO 0 +#define FIXED_FREQUENCY 12000000L + /* The default driver if not specified otherwise during connect */ #ifdef ENABLE_LOWLEVEL_FTD2XX #define DEFAULT_DRIVER "ftd2xx" @@ -93,6 +95,16 @@ usbblaster_connect( char *params[], cable_t *cable ) return 0; } +void +usbblaster_set_frequency( cable_t *cable, uint32_t new_frequency ) +{ + if (new_frequency != FIXED_FREQUENCY) + printf( _("Warning: USB-Blaster frequency is fixed to %ld Hz\n"), + FIXED_FREQUENCY ); + + cable->frequency = FIXED_FREQUENCY; +} + static int usbblaster_init( cable_t *cable ) { @@ -108,6 +120,8 @@ usbblaster_init( cable_t *cable ) cx_xfer( cmd_root, NULL, cable, COMPLETELY ); + usbblaster_set_frequency( cable, FIXED_FREQUENCY ); + return 0; } @@ -421,12 +435,6 @@ usbblaster_flush( cable_t *cable, cable_flush_amount_t how_much ) } } -void -usbblaster_set_frequency( cable_t *cable, uint32_t new_frequency ) -{ - cable->frequency = new_frequency; -} - void usbblaster_help( const char *cablename ) {