Skip to content

Commit

Permalink
Missing Spi.end() before RegConfigSettings() caused ESP32-C3 to hang
Browse files Browse the repository at this point in the history
RegConfigSettings() also does SPI.begin() and SPI.end(), which seems to make the code stop since there was two SPI.begin() wihtout an SPI.end() in between.
Moving SpiEnd() to before RegConfigSettings() matches the Spi.begin() from SpiStart() and solves the issue.
  • Loading branch information
fleibede committed Jul 26, 2024
1 parent b8c6af4 commit 9b15376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ELECHOUSE_CC1101_SRC_DRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ void ELECHOUSE_CC1101::Init(void)
digitalWrite(SCK_PIN, HIGH);
digitalWrite(MOSI_PIN, LOW);
Reset(); //CC1101 reset
RegConfigSettings(); //CC1101 register config
SpiEnd();
RegConfigSettings(); //CC1101 register config
}
/****************************************************************
*FUNCTION NAME:SpiWriteReg
Expand Down

0 comments on commit 9b15376

Please sign in to comment.