bugAVR Downloader/UploaDEr - Bugs: bug #46587, patch: transparent SPI (relay) mode

 
 

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

bug #46587: patch: transparent SPI (relay) mode

Submitted by:  None
Submitted on:  Wed 02 Dec 2015 07:30:22 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: Tibor 'Igor2' Palinkas
Originator Email: -unavailable-Open/Closed: Open
Release: NoneProgrammer hardware: 
Device type: 

Wed 02 Dec 2015 07:30:22 AM UTC, original submission:

(This is not a bug report but a patch for a new feature. This was the
only tracker I could add it to without registration.)

In my next open source hardware project I program an attiny to be an SPI
slave. I figured the easiest way to test the firmware would be to use my
parallel port avr programmer device to emulate an SPI bus master. For this
I need avrdude to be able to:

- avoid resetting the target device
- omit any SPI commands related to AVR programming during initialization
- initiate arbitrary long SPI transactions

The patch attached implements this in the following steps.

1. a new device flag AVRPART_NO_RESET can disable the reset signal
normally generated for no-tpi devices

2. a new device configuration called "spi" or "transparent_spi" defines
a device that omits the reset and all SPI communication during initialization

3. a new command line switch -S puts avrdude in transparent SPI mode

4. in transparent SPI mode binary data is relayed between stdio and SPI until
EOF on stdin.

I've tested it with a parallel port programmer and a scope, with
MISO-MOSI looped back with a wire, left unconnected or an attiny2313
connected. Both the transparent SPI mode and programming the attiny worked.
I have no idea if it works with non-bitbang programmers.

Command line for the transparent SPI mode: avrdude -c <whatever> -p spi -S

Anonymous

 

Attached Files
file #35611:  SPI.patch added by None (9KiB - text/x-diff - svn diff in trunk/avrdude)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Dec 2015 07:30:22 AM UTCNoneAttached File-=>Added SPI.patch, #35611

    Back to the top


    Powered by Savane 3.1-cleanup1