From e5e99d5be0cf87f4ea68282a88dbeedea9b6e11e Mon Sep 17 00:00:00 2001 From: jim Date: Mon, 4 Aug 2025 15:31:49 -0700 Subject: [PATCH] Fix hang on ESP32 (Issue# 156) Call endTransaction to release a mutex acquired by beginTransaction. setClockDivider later tries to acquire the mutex. Signed-off-by: jim --- src/PN532_SPI.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PN532_SPI.cpp b/src/PN532_SPI.cpp index 929b4ed..dcebfbf 100644 --- a/src/PN532_SPI.cpp +++ b/src/PN532_SPI.cpp @@ -21,6 +21,7 @@ void PN532_SPI::begin() _spi->begin(); _spi->beginTransaction(SPISettings(1000000, LSBFIRST, SPI_MODE0)); + _spi->endTransaction(); #if defined(ARDUINO_XIAO_RA4M1) || defined(ARDUINO_ARCH_RP2040) || defined(ARDUINO_ARCH_RP2350) #else // _spi->setDataMode(SPI_MODE0); // PN532 only supports mode0