Skip to content

Commit 2839832

Browse files
committed
Disabling the doubling SCK clock speed after PE fixes the read errors . Need to investigate more . Fix #22
1 parent d0b8d9a commit 2839832

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

firmware/isp.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ uchar ispEnterProgrammingMode() {
202202

203203
if (check == 0x53) {
204204
/* Don't bump up speed to 3 Mhz */
205-
if(prog_sck < USBASP_ISP_SCK_1500){
205+
// if(prog_sck < USBASP_ISP_SCK_1500){
206206

207-
/* bump up speed now that programming mode is enabled */
208-
/* http://nerdralph.blogspot.com/2020/09/recording-reset-pin.html */
209-
spiHWdisable();
210-
ispSetSCKOption(prog_sck + 1);
211-
if (ispTransmit == ispTransmit_hw) spiHWenable();
207+
// /* bump up speed now that programming mode is enabled */
208+
// /* http://nerdralph.blogspot.com/2020/09/recording-reset-pin.html */
209+
// spiHWdisable();
210+
// ispSetSCKOption(prog_sck + 1);
211+
// if (ispTransmit == ispTransmit_hw) spiHWenable();
212212

213-
}
213+
// }
214214
return 0;
215215
}
216216

@@ -225,8 +225,9 @@ uchar ispEnterProgrammingMode() {
225225
spiTx(0);
226226
check = spiTx(0);
227227

228-
if (check == 0x69)
228+
if (check == 0x69){
229229
return 0;
230+
}
230231

231232
} while (--tries);
232233

0 commit comments

Comments
 (0)