Search found 14 matches

by KWolfe81
Thu Mar 24, 2022 6:49 pm
Forum: ESP-IDF
Topic: QuadSPI - cannot change ADDR & DUMMY lengths in slave mode
Replies: 0
Views: 999

QuadSPI - cannot change ADDR & DUMMY lengths in slave mode

I'm using the SPI peripheral as a slave in QPI mode. By default, the ADDR phase is 1-byte and DUMMY is 2 bytes, both in 4-bit mode, for a total of 6 SPI Clock periods. This is as per the datasheet (Table 138, Section 24.5.3 GP-SPI2 Slave Mode Single Transfer) and also matches my observations (e.g. i...
by KWolfe81
Tue Mar 08, 2022 8:38 pm
Forum: ESP-IDF
Topic: SPI Slave - DMA 2M max read length limit
Replies: 3
Views: 2390

Re: SPI Slave - DMA 2M max read length limit

ESP_Sprite wrote:
Mon Mar 07, 2022 8:03 am
Digital team says you can get around the limit by setting up segmented transfers, and having the segments to be >2MiB (ref trm section 24.5.4. Perhaps that's a feasible workaround?
Great, thanks! I'll give it a try.
by KWolfe81
Wed Mar 02, 2022 11:42 pm
Forum: ESP-IDF
Topic: SPI Slave - DMA 2M max read length limit
Replies: 3
Views: 2390

SPI Slave - DMA 2M max read length limit

I'm using the ESP32S2 and would like to write a continuous stream of data out of the SPI peripheral. I'm using DMA mode with some circular linked lists to achieve high data volumes. However, after 2MB, the ESP32S2 only shifts out 0xFF values despite the hardware appearing to work as expected. I note...
by KWolfe81
Thu Feb 17, 2022 9:08 pm
Forum: ESP-IDF
Topic: ESP32S2 - Quad SPI Slave / QPI Example + Notes
Replies: 3
Views: 3284

ESP32S2 - Quad SPI Slave / QPI Example + Notes

I went looking for an example of using the QuadSPI on the ESP32S2 in slave mode and couldn't find one. So I wrote one and am sharing it case anyone in the future goes down this road: https://gitlab.com/kevinwolfe/esp32s2_qspi All source code is in a single file: ./main/main.c Test script included: ....
by KWolfe81
Tue Feb 01, 2022 12:03 am
Forum: ESP-IDF
Topic: ESP32S2 - SPI HAL or LL Example
Replies: 0
Views: 2487

ESP32S2 - SPI HAL or LL Example

Does anyone have a simple example of getting the SPI module to dance using just the HAL or LL layers? Ideally, master mode with interrupts, but I'll take what I can get. Context: I'm looking to utilize the ESP32S2's SPI peripheral but the IDF drivers have way too many RTOS calls and protections. The...
by KWolfe81
Fri Jan 07, 2022 8:17 pm
Forum: ESP-IDF
Topic: ESP32S2: UART1 + USB
Replies: 2
Views: 2955

Re: ESP32S2: UART1 + USB

Solved!
Two things:
1) Forgot to set

Code: Select all

#define CFG_TUSB_MCU             OPT_MCU_ESP32S2
2) Looks like UART1 & USB share an interrupt. You need to set

Code: Select all

intr_alloc_flags = ESP_INTR_FLAG_SHARED;
in the call to uart_driver_install()
by KWolfe81
Fri Jan 07, 2022 8:04 pm
Forum: ESP-IDF
Topic: ESP32S2: UART1 + USB
Replies: 2
Views: 2955

Re: ESP32S2: UART1 + USB

EDIT: Deleted, solved issue, see below.
by KWolfe81
Fri Jan 07, 2022 6:34 pm
Forum: ESP-IDF
Topic: ESP32S2: UART1 + USB
Replies: 2
Views: 2955

ESP32S2: UART1 + USB

EDIT: Solved, see below.

I can't get UART1 & USB working simultaneously. Does the USB HCI use UART1? If so, I can't find anything in the documentation indicating that.
by KWolfe81
Mon Dec 20, 2021 9:02 pm
Forum: ESP-IDF
Topic: ESP32-S2 generic parallel input over I2S
Replies: 6
Views: 8733

Re: ESP32-S2 generic parallel input over I2S

Last post on this topic. Got it working, requires rx_dma_equal = 1. I'm not super confident of the meaning of this register, but there ya go. Good luck to any that stray here from the future. #include "driver/gpio.h" #include "driver/i2s.h" #include "driver/ledc.h" #include "driver/periph_ctrl.h" #i...
by KWolfe81
Sat Dec 18, 2021 12:46 am
Forum: ESP-IDF
Topic: ESP32-S2 generic parallel input over I2S
Replies: 6
Views: 8733

Re: ESP32-S2 generic parallel input over I2S

Fully self contained example of my error below. This generates bit clock (2 MHz), data clock (1 MHz), a pulse on the word-clk to start data flowing, and outputs the DMA buffer to show the error. Grrr...

EDIT: Code removed, see later posts in this thread for a more up-to-date version.