You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

设置128kHz内部RC后无法与ATtiny13a通信,求恢复方法

ATtiny13a 128kHz时钟配置后无法通信的恢复方案

执行命令avrdude -c usbasp -p t13 -U lfuse:w:0x67:m -v将ATtiny13a设置为128kHz内部RC时钟后,无法与MCU建立通信,目标是擦除整个闪存或恢复熔丝位至默认值。运行avrdude -p t13 -c usbasp -e -F -v -B 128kHz得到以下输出:

avrdude -p t13 -c usbasp -e -F -v -B 128kHz

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/bubs/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         Setting bit clk period        : 7.8
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: set SCK frequency to 93750 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xe8a7da
avrdude: Expected signature for ATtiny13 is 1E 90 07

avrdude done.  Thank you.

已尝试操作:

  • 使用LC Technology usbasp 2.0编程器
  • 重新连接编程器与MCU
  • 修改-B参数调整SCK时钟
  • 参考常规解决方案后问题仍存在

解决建议

1. 升级USBasp固件

输出中明确提示cannot set sck period. please check for usbasp firmware update,部分廉价LC Technology USBasp的原厂固件不支持低SCK频率的精准调整。升级到支持-B参数动态调整SCK的官方USBasp固件,可让编程器输出与MCU 128kHz时钟匹配的低速SCK信号。

2. 硬件修改强制降低SCK频率

若固件升级不可行,可通过硬件方式降低SCK速度:

  • 在USBasp的SCK引脚(通常为引脚9)与GND之间焊接一个10kΩ的下拉电阻,强制拉低SCK信号的切换速度,适配MCU的低速时钟。

3. 高压编程恢复熔丝

如果ISP方式完全无法通信,可尝试高压并行编程:

  • 给MCU的RESET引脚施加12V高压(其他引脚保持5V供电),绕过常规ISP的通信限制,直接重置熔丝位至默认值。可自行搭建简易高压编程电路或使用专用高压编程器。

4. 排查硬件连接细节

  • 确认MCU的VCC供电稳定在5V(即使是128kHz低速时钟,ATtiny13a仍需5V工作电压)
  • 逐一检查ISP引脚连接:SCK、MOSI、MISO、RESET、GND是否对应正确,无虚焊、断线或接触不良
  • 在RESET引脚与VCC之间焊接一个10kΩ上拉电阻,增强复位信号的稳定性,避免通信时复位信号异常

内容的提问来源于stack exchange,提问作者permanentnydebet

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 22:35:44