Skip to content

Commit

Permalink
SPI: increase buffer size on H7
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh committed Jul 16, 2023
1 parent 0c33554 commit e8da4ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions board/drivers/spi.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

#include "crc.h"

#define SPI_BUF_SIZE 1024U
#define SPI_TIMEOUT_US 10000U

// got max rate from hitting a non-existent endpoint
// in a tight loop, plus some buffer
#define SPI_IRQ_RATE 16000U

#ifdef STM32H7
#define SPI_BUF_SIZE 2048U
__attribute__((section(".ram_d1"))) uint8_t spi_buf_rx[SPI_BUF_SIZE];
__attribute__((section(".ram_d1"))) uint8_t spi_buf_tx[SPI_BUF_SIZE];
__attribute__((section(".ram_d2"))) uint8_t spi_buf_tx[SPI_BUF_SIZE];
#else
#define SPI_BUF_SIZE 1024U
uint8_t spi_buf_rx[SPI_BUF_SIZE];
uint8_t spi_buf_tx[SPI_BUF_SIZE];
#endif
Expand Down

0 comments on commit e8da4ea

Please sign in to comment.