bugAVR Downloader/UploaDEr - Bugs: bug #43912, PATCH avrdude direct SPI mode NULL...


You are not allowed to post comments on this tracker with your current authentication level.

bug #43912: PATCH avrdude direct SPI mode NULL pointer crash

Submitter:  David Fries <dfries>
Submitted:  Fri 02 Jan 2015 02:34:56 AM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  * David Fries
Open/Closed:  Open Release:  * None
Programmer hardware:  Device type: 
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


Sun 11 Jan 2015 02:19:41 AM UTC, comment #1: 

At least with the USBtiny 2.0 there is a one byte SPI command, that could be used instead of requiring 4 bytes at a time.  It also supports bit banging any pin on that port.

David Fries <dfries>
Fri 02 Jan 2015 02:34:56 AM UTC, original submission:  

The AVR serial programmer protocol is SPI, so it would be nice to use avrdude to send and receive data over SPI for debugging while the microcontroller is up and running, seems someone else agreed and implemented a direct SPI terminal mode, however use USBtiny and avrdude crashes when giving spi to enter direct SPI mode.  The man page lists "Only supported on parallel bitbang programmers.", however the requirement really is to be able to be able to set RESET high (or float), and the circuit must allow SS (slave select) to be pulled low, but unlike RESET can be left low the entire time, making it easy enough to get around in the circuit.

I'm including a patch for both 5.x and 6 avrdude to fix the crash for any programmer that doesn't support setpin, and implementing support for USBtiny, the limitation is SS held low and transferring multiples of 4 bytes at a time.

I would prefer to use a "spi_send", "spi_bytes" or some command different from the "send" because it would be really easy to accidentally be in programming mode without the normal checks.

David Fries <dfries>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #32744:  spi_fix_5.11.1.patch added by dfries (4KiB - text/x-patch - fix for version 5 and 6)
file #32745:  spi_fix_6.patch added by dfries (6KiB - text/x-patch - fix for version 5 and 6)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dfries (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-02 dfries Attached File- Added spi_fix_5.11.1.patch, #32744
        Attached File- Added spi_fix_6.patch, #32745

    Back to the top

    Powered by Savane 3.9