Open chltmdwmf opened 2 years ago
It could be minimized. The period for holding reset line is required to be > 100 us, so fixing it to 1ms is fine. Although, the period after reset is indeed much smaller than what is in the code. The datasheet speaks about 5 ms. I think it would be safe to reduce it down to 10 ms.
For example, the SX1278_hw_Reset function has SX1278_hw_DelayMs (100). Is this necessary? __weak void SX1278_hw_Reset(SX1278_hw_t *hw) { SX1278_hw_SetNSS(hw, 1); HAL_GPIO_WritePin(hw->reset.port, hw->reset.pin, GPIO_PIN_RESET); SX1278_hw_DelayMs(1); HAL_GPIO_WritePin(hw->reset.port, hw->reset.pin, GPIO_PIN_SET); SX1278_hw_DelayMs(100); <--------- THIS }
In addition to the SX1278_hw_Reset function, other functions also use the delay function, but is delay a required element?