SPI as an interrupt-driven slave

corrado
Posts: 1
Joined: Sat Mar 09, 2024 1:50 pm

SPI as an interrupt-driven slave

Postby corrado » Sat Mar 09, 2024 1:55 pm

I need to migrate from Arduino Uno to ESP32 an application where the SPI subsystem is used as an interrupt-driven slave:

void setup()
{

SPCR=bit(SPE);
SPI.attachInterrupt();
}


ISR (SPI_STC_vect)
{
spi_dat=SPDR;
}

These instructions generate compilation error because are tied to Arduino Uno hardware (SPI Control and Data registers) and compiler (ISR).

Is it possible to substitute them via the class library provided by ESP32 environment ?

MicroController
Posts: 1690
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: SPI as an interrupt-driven slave

Postby MicroController » Sun Mar 10, 2024 7:00 pm


Who is online

Users browsing this forum: No registered users and 64 guests