Search found 4 matches

by kyorochan
Fri Aug 14, 2026 3:56 am
Forum: ESP-IDF
Topic: SPI slave transaction .rx_buffer issue
Replies: 6
Views: 36

Re: SPI slave transaction .rx_buffer issue


InternalHeapSize: 186263
LargsetFreeBlock: 118784

Heap summary for capabilities 0x0000080C:
At 0x3fc9b280 len 32767 free 32031 allocated 0 min_free 32031
largest_free_block 31744 alloc_blocks 0 free_blocks 1 total_blocks 1
At 0x3fce9710 len 22308 free 2248 allocated 18844 min_free 2220 ...
by kyorochan
Fri Aug 14, 2026 3:11 am
Forum: ESP-IDF
Topic: SPI slave transaction .rx_buffer issue
Replies: 6
Views: 36

Re: SPI slave transaction .rx_buffer issue


//bit_length = section_size * 8;
bit_length = 512 * 8;

spi_slave_transaction_t t = {
.length = bit_length,
.rx_buffer = (rx_ptr + offset),
// .rx_buffer = recv_buf,
.tx_buffer = NULL,
.flags = 0,
.trans_len = 0,
.user = NULL,
};



It doesn't work. I still get exception at second ...
by kyorochan
Thu Aug 13, 2026 11:06 am
Forum: ESP-IDF
Topic: SPI slave transaction .rx_buffer issue
Replies: 6
Views: 36

Re: SPI slave transaction .rx_buffer issue


cnt++;

// each time, SPI receiver 420 bytes
offset += 512; // for DMA alignment

if ((cnt % 10) == 0) { offset = 0; } // prevent buffer overflow


I have buffers size 8192 bytes, and only used 5632 bytes (above code section), it is ring-buffer.
And I make sure echo time SPI-slave only received ...
by kyorochan
Wed Aug 12, 2026 8:42 am
Forum: ESP-IDF
Topic: SPI slave transaction .rx_buffer issue
Replies: 6
Views: 36

SPI slave transaction .rx_buffer issue

Chipset: ESP32S3
ESP-IDF v6.0.2


#define SPI_RECV_DMA_BUF_SIZE (8 * 1024)

esp_err_t _spi_slave_receive()
{
recv_buf = heap_caps_calloc(SPI_RECV_DMA_BUF_SIZE, 1, MALLOC_CAP_DMA);

uint8_t * rx_ptr = recv_buf;
int offset = 0;

uint32_t bit_length;
uint32_t reaminder = 11420;
uint32_t byte ...

Go to advanced search