diff --git a/src/jtag/ft2232.c b/src/jtag/ft2232.c index e3d92dce6..3cc552d77 100644 --- a/src/jtag/ft2232.c +++ b/src/jtag/ft2232.c @@ -296,6 +296,12 @@ int ft2232_khz(int khz, int *jtag_speed) *jtag_speed = 0; } + /* Check max value */ + if (*jtag_speed > 0xFFFF) + { + *jtag_speed = 0xFFFF; + } + return ERROR_OK; }