Skip to content

Commit

Permalink
Use open drain outputs for RF module
Browse files Browse the repository at this point in the history
Specifically, the SPI outputs and the CS pin are set to be open drain
outputs.
  • Loading branch information
PatrickKa committed Sep 29, 2024
1 parent 2531b7f commit bc3d11c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sts1CobcSw/Periphery/Rf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ auto SetTxType(TxType txType) -> void
auto InitializeGpiosAndSpi() -> void
{
csGpioPin.Direction(hal::PinDirection::out);
csGpioPin.OutputType(hal::PinOutputType::openDrain);
csGpioPin.Set();
nirqGpioPin.Direction(hal::PinDirection::in);
sdnGpioPin.Direction(hal::PinDirection::out);
Expand All @@ -181,7 +182,7 @@ auto InitializeGpiosAndSpi() -> void
watchdogResetGpioPin.Reset();

constexpr auto baudrate = 6'000'000;
Initialize(&spi, baudrate);
Initialize(&spi, baudrate, /*useOpenDrainOutputs=*/true);

// Enable Si4463 and wait for PoR to finish
AT(NOW() + porCircuitSettleDelay);
Expand Down

0 comments on commit bc3d11c

Please sign in to comment.