From 9ea145192e9f5e8972eea46bb13a3bb98d527098 Mon Sep 17 00:00:00 2001 From: YiChin Date: Wed, 7 Oct 2020 17:30:18 +0800 Subject: [PATCH] update SPI1 phase --- .../simple_peripheral/cc26xx/app/headstage/EliteSPI.h | 4 ++-- .../simple_peripheral/cc26xx/app/headstage/Elite_PIN.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteSPI.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteSPI.h index e1b303f85..b96ad777b 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteSPI.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/EliteSPI.h @@ -52,7 +52,7 @@ static void Elite_SPI_init(){ spiParams1.bitRate = 1000000; // 1M spiParams1.mode = SPI_MASTER; spiParams1.dataSize = 8; - spiParams1.frameFormat = SPI_POL0_PHA0; + spiParams1.frameFormat = SPI_POL0_PHA1; spiHandle1 = SPI_open(Board_SPI1, &spiParams1); // ADC DAC SPI } @@ -111,7 +111,7 @@ static void CAL_LED_SPI(uint8_t length, uint16_t *spi_txbuf, uint16_t *spi_rxbuf //define SPI command #define SPICMD_SETADDR 0x20 #define SPICMD_WRITEREG 0x2D -#define v 0x6D +#define SPICMD_READREG 0x6D //define REG #define LPDACCON0 0x2128 diff --git a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_PIN.h b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_PIN.h index 7ad544bc5..b86015a47 100644 --- a/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_PIN.h +++ b/simplelink/ble_sdk_2_02_02_25/src/examples/simple_peripheral/cc26xx/app/headstage/Elite_PIN.h @@ -29,7 +29,6 @@ PIN_Handle pin_handle; static PIN_State ZM_rst; const PIN_Config BLE_IO[] = { - Board_SPI1_CS | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // Board_SPI1_CS enable_5v | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL | PIN_DRVSTR_MAX, // 5V_enable switch_on | PIN_INPUT_EN | PIN_PULLDOWN, PIN_TERMINATE