avr_boot icon indicating copy to clipboard operation
avr_boot copied to clipboard

Question: Is it possible to use Software Spi?

Open hmantz opened this issue 5 years ago • 2 comments

Hi all! I have a project with an Atmega328P and I am using the hardware SPI pins for a different purpose. Is it possible to use non-standard pins to flash a new bootloader from a SD card?

hmantz avatar Oct 08 '19 09:10 hmantz

Yes, to use software SPI or any other form of SPI, just rewrite these functions:

void init_spi (void);		/* Initialize SPI port (asmfunc.S) */
void xmit_spi (BYTE d);		/* Send a byte to the MMC (asmfunc.S) */
BYTE rcv_spi (void);		/* Send a 0xFF to the MMC and get the received byte (asmfunc.S) */

They can be written in C/C++ as well as in AVR assembly.

Kieran-Weaver avatar Sep 05 '20 22:09 Kieran-Weaver

Hello, we have an Arduino Mega2560 available here that comes preinstalled with a microSD flash installer while still supporting updates through SPI.

FergusonMG avatar Aug 02 '21 03:08 FergusonMG