Skip to content

Resolved : Hang at CC1101 Init #172

@pleneve

Description

@pleneve

Here is the changed code to resolve Hang at CC1101 Init :

/****************************************************************
*FUNCTION NAME:Init
*FUNCTION     :CC1101 initialization
*INPUT        :none
*OUTPUT       :none
*HISTORY      : PLN 11/2025 - SpiEnd moved before RegCongigSettings
****************************************************************/
void ELECHOUSE_CC1101::Init(void)
{
  setSpi();
  SpiStart();                   //spi initialization
  Reset();                      //CC1101 reset
  SpiEnd();                     //spi disable
  RegConfigSettings();          //CC1101 register config
}

Just move SpiEnd(); before RegConfigSettings(); to close the spi driver opened with SpiStart();
RegConfigSettings() uses SpiWriteReg function to setup register which open and close Spi driver.
Program hang if there are two SPI.begin() called without SPI.end() call between them.

PLN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions