Search found 28 matches

by themindfactory
Thu May 10, 2018 5:05 pm
Forum: ESP-IDF
Topic: SPI DMA and interrupts...
Replies: 4
Views: 8120

Re: SPI DMA and interrupts...

There is an example of pre-transfer callback in \esp-idf\examples\peripherals\spi_master There is also a post-transfer callback as well that you can setup to tell you when the transfer is complete. http://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/spi_master.html Thanks for the repl...
by themindfactory
Thu May 10, 2018 3:58 pm
Forum: ESP-IDF
Topic: SPI DMA and interrupts...
Replies: 4
Views: 8120

SPI DMA and interrupts...

I have been able to write code that sends out SPI data using DMA... however I can not figure out how to get it to interrupt me to tell me its done with the transfer, right now it waits for completion.....

I used this code for my example https://github.com/natanaeljr/esp32-SPIbus

RichardS.
by themindfactory
Mon May 07, 2018 11:33 pm
Forum: ESP32 Arduino
Topic: How to use the SPI and send continuous data no gaps...
Replies: 7
Views: 12279

Re: How to use the SPI and send continuous data no gaps...

Ah, the Arduino SDK uses its own drivers, unfortunately I don't really know how those work. Also, moved this topic to the Arduino subforum. No problem, I have figured it out by writing my own driver for it within the Arduino IDE, I found someone with some fairly simple code to control the SPI... ht...
by themindfactory
Sun May 06, 2018 4:00 am
Forum: ESP32 Arduino
Topic: How to use the SPI and send continuous data no gaps...
Replies: 7
Views: 12279

Re: How to use the SPI and send continuous data no gaps...

BTW I have both I2S peripherals running with DMA at the time of this test.

And it is using the Arduino IDE also.

RichardS
by themindfactory
Sun May 06, 2018 3:19 am
Forum: ESP32 Arduino
Topic: How to use the SPI and send continuous data no gaps...
Replies: 7
Views: 12279

Re: How to use the SPI and send continuous data no gaps...

Oscilloscope :=)

I did something like for testing:

uint8_t i = 0x55;
while(1) {
hspi->transfer(i);
}

there were gaps every 8 bits...

You are saying it should be fluent? If I sent say...

uint8_t array[100];
int i = 0;
while(++i != 100) {
hspi->transfer(array);
}

no gaps??

RichardS
by themindfactory
Sat May 05, 2018 10:08 pm
Forum: ESP-IDF
Topic: Is it possible to run SPI communication in ISR of GPIO?
Replies: 4
Views: 7130

Re: Is it possible to run SPI communication in ISR of GPIO?

There are very few things you can safely call in an ISR, as it runs outside of the task context. Most notably, FreeRTOS functions ending in FromISR can be called, and the standard way of dealing with this is to have a semaphore or queue plus a thread blocking on that. The ISR can then put something...
by themindfactory
Sat May 05, 2018 8:38 pm
Forum: ESP32 Arduino
Topic: How to use the SPI and send continuous data no gaps...
Replies: 7
Views: 12279

How to use the SPI and send continuous data no gaps...

Right now it seems when I send SPI data it send in chunks of 8 with a gap in between.

I need a continuous stream of data no breaks or gaps,

Also, can the ESP32 send data in formats longer than 8 bits?

RichardS
by themindfactory
Mon Mar 26, 2018 7:58 pm
Forum: Showcase
Topic: I2S-parallel example: Drive a 64x32 display
Replies: 61
Views: 282717

Re: I2S-parallel example: Drive a 64x32 display

Can I2S0 be used instead of I2S1??

I have swapped and it seems not to work...

RichardS