aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
Diffstat (limited to 'testhal')
-rw-r--r--testhal/SPC563Mxx/SPI/main.c14
-rw-r--r--testhal/SPC563Mxx/SPI/mcuconf.h1
2 files changed, 13 insertions, 2 deletions
diff --git a/testhal/SPC563Mxx/SPI/main.c b/testhal/SPC563Mxx/SPI/main.c
index cd36b2ad1..9ddb9761a 100644
--- a/testhal/SPC563Mxx/SPI/main.c
+++ b/testhal/SPC563Mxx/SPI/main.c
@@ -25,14 +25,24 @@
* Maximum speed SPI configuration (21MHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig hs_spicfg = {
- NULL
+ NULL,
+ 0,
+ 0,
+ 0, /* MCR. */
+ SPC5_CTAR_FMSZ(8) | SPC5_CTAR_PBR_PRE2 | SPC5_CTAR_BR_DIV2, /* CTAR0. */
+ 0 /* PUSHR. */
};
/*
* Low speed SPI configuration (328.125kHz, CPHA=0, CPOL=0, MSb first).
*/
static const SPIConfig ls_spicfg = {
- NULL
+ NULL,
+ 0,
+ 0,
+ 0, /* MCR. */
+ SPC5_CTAR_FMSZ(8) | SPC5_CTAR_PBR_PRE2 | SPC5_CTAR_BR_DIV256, /* CTAR0. */
+ 0 /* PUSHR. */
};
/*
diff --git a/testhal/SPC563Mxx/SPI/mcuconf.h b/testhal/SPC563Mxx/SPI/mcuconf.h
index 784a14d47..a7f5046e3 100644
--- a/testhal/SPC563Mxx/SPI/mcuconf.h
+++ b/testhal/SPC563Mxx/SPI/mcuconf.h
@@ -90,3 +90,4 @@
#define SPC5_SPI_DSPI2_DMA_PRIO 10
#define SPC5_SPI_DSPI1_DMA_IRQ_PRIO 10
#define SPC5_SPI_DSPI2_DMA_IRQ_PRIO 10
+#define SPC5_SPI_DMA_ERROR_HOOK(spip) chSysHalt()