Skip to content

Commit cbe0f73

Browse files
committed
Fix: Do not disable SPI for manual drive mode during transaction setup
It has been reported that disabling SPI module causes glitch for manual SS drive mode Signed-off-by: Sadik.Ozer <sadik.ozer@analog.com>
1 parent 67c25e8 commit cbe0f73

File tree

2 files changed

+2
-2
lines changed
  • targets/TARGET_Maxim
    • TARGET_MAX32660/Libraries/PeriphDrivers/Source/SPI
    • TARGET_MAX32670/Libraries/PeriphDrivers/Source/SPI

2 files changed

+2
-2
lines changed

targets/TARGET_Maxim/TARGET_MAX32660/Libraries/PeriphDrivers/Source/SPI/spi_reva.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ int MXC_SPI_RevA_TransSetup(mxc_spi_reva_req_t *req)
764764
states[spi_num].started = 0;
765765
states[spi_num].req_done = 0;
766766
// HW requires disabling/renabling SPI block at end of each transaction (when SS is inactive).
767-
if (states[spi_num].ssDeassert == 1) {
767+
if (states[spi_num].drv_ssel && (states[spi_num].ssDeassert == 1)) {
768768
(req->spi)->ctrl0 &= ~(MXC_F_SPI_REVA_CTRL0_EN);
769769
}
770770

targets/TARGET_Maxim/TARGET_MAX32670/Libraries/PeriphDrivers/Source/SPI/spi_reva.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ int MXC_SPI_RevA_TransSetup(mxc_spi_reva_req_t *req)
764764
states[spi_num].started = 0;
765765
states[spi_num].req_done = 0;
766766
// HW requires disabling/renabling SPI block at end of each transaction (when SS is inactive).
767-
if (states[spi_num].ssDeassert == 1) {
767+
if (states[spi_num].drv_ssel && (states[spi_num].ssDeassert == 1) ) {
768768
(req->spi)->ctrl0 &= ~(MXC_F_SPI_REVA_CTRL0_EN);
769769
}
770770

0 commit comments

Comments
 (0)