pyUPDI (with diode) - error during programming #446
Replies: 3 comments 11 replies
-
I built mine from this CH340 adapter without any resistors and only a diode between RX ->|- TX on the adapter and it is stable on all 3 speeds, including 460800 baud. |
Beta Was this translation helpful? Give feedback.
-
These branching threads are wack, I don't like how threads work here... I wish it would just work like a normal forum. @hmeijdam I had problems with non-schottky diodes too,. thats' why I specify a small signal schottky diode. |
Beta Was this translation helpful? Give feedback.
-
I built a second programmer and it's the same. Can you please fix this problem? |
Beta Was this translation helpful? Give feedback.
-
Hi. I built a diode programmer as recommended in project DxCore (https://github.com/SpenceKonde/AVR-Guidance/blob/master/UPDI/jtag2updi.md):
Ideal:
internal resistor in adapter: 2.2k >= Ra
resistor on target: 2k >= Rt >= 100 (100-470 rec.)
If I load the attiny414 circuit with this pyUPDI programmer and select "serial-UPDI with 4.7k resistor or diode SLOW...", everything is fine. But if I choose the normal option from TURBO, the programming ends with an error:
Arduino <---> pymcuprog bridge by Quentin Bolsee and Spence Konde
Version 1.1.0 - May 2021
Using serial port COM6 at 230400 baud.
Target: attiny414
Set fuses: ['2:0x02', '6:0x04', '8:0x00']
Action: write
File: C:\Users\radek\AppData\Local\Temp\arduino_build_761162/Blink.ino.hex
Pinging device...
Ping response: 1E9222
Setting fuse 0x2=0x2
Writing literal values...
Verifying literal values...
Action took 0.02s
Setting fuse 0x6=0x4
Writing literal values...
Verifying literal values...
Action took 0.00s
Setting fuse 0x8=0x0
Writing literal values...
Verifying literal values...
Action took 0.02s
Finished writing fuses.
Chip/Bulk erase,
Memory type eeprom is conditionally erased (depending upon EESAVE fuse setting)
Memory type flash is always erased
Memory type internal_sram is always erased
Memory type lockbits is always erased
...
Erased.
Action took 0.02s
Writing from hex file...
Writing flash...
[==== ] 1/11Traceback (most recent call last):
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2/tools/prog.py", line 266, in
main()
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2/tools/prog.py", line 121, in main
return_code = pymcuprog_basic(args, fuses_dict)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2/tools/prog.py", line 240, in pymcuprog_basic
Nastala chyba při nahrávaní projektu.
blocksize=args.blocksize)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2/tools/prog.py", line 131, in run_pymcu_action
status = func(backend, *args, args_pymcu)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\pymcuprog_main.py", line 341, in _action_write
_write_memory_segments(backend, result, args.verify, blocksize=args.blocksize)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\pymcuprog_main.py", line 392, in _write_memory_segments
backend.write_memory(segment.data, memory_name, segment.offset, blocksize=blocksize)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\backend.py", line 526, in write_memory
self.programmer.write_memory(data=data, memory_name=memory_name, offset=offset_byte, blocksize=blocksize)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\programmer.py", line 190, in write_memory
self.device_model.write(memory, offset, data, blocksize=blocksize)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\nvmserialupdi.py", line 175, in write
self.avr.nvm.write_flash(offset_aligned, chunk, blocksize=-1, bulkwrite = bulk)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\nvm.py", line 117, in write_flash
return self.write_nvm(address, data, use_word_access=True, blocksize=blocksize, bulkwrite=bulkwrite)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\nvm.py", line 198, in write_nvm
self.execute_nvm_command(nvmcommand)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\nvm.py", line 76, in execute_nvm_command
return self.readwrite.write_byte(self.device.nvmctrl_address + constants.UPDI_NVMCTRL_CTRLA, command)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\readwrite.py", line 64, in write_byte
return self.datalink.st(address, value)
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\link.py", line 300, in st
return self._st_data_phase([value & 0xFF])
File "C:\Users\radek\AppData\Local\Arduino15\packages\megaTinyCore\hardware\megaavr\2.3.2\tools\libs\pymcuprog\serialupdi\link.py", line 246, in _st_data_phase
raise PymcuprogError("Error with st")
pymcuprog.pymcuprog_errors.PymcuprogError: Error with st
Beta Was this translation helpful? Give feedback.
All reactions