Skip to content

Commit

Permalink
imu/ADIS16470: Add minimum delay of 200ns from CS assertion to transf…
Browse files Browse the repository at this point in the history
…er start

This is required by the datasheet, and the delay is too short causing errors on some platforms

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Oct 23, 2024
1 parent 8693839 commit 8d8094e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/drivers/imu/analog_devices/adis16470/ADIS16470.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ ADIS16470::ADIS16470(const I2CSPIDriverConfig &config) :
if (_drdy_gpio != 0) {
_drdy_missed_perf = perf_alloc(PC_COUNT, MODULE_NAME": DRDY missed");
}

set_cs_to_sck_delay(SPI_CS_TO_SCK_PERIOD_NS);
}

ADIS16470::~ADIS16470()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ static constexpr uint32_t SPI_SPEED_BURST = 1 * 1000 * 1000; // 1 MHz SPI serial

static constexpr uint32_t SPI_STALL_PERIOD = 16; // 16 us Stall period between data

static constexpr uint32_t SPI_CS_TO_SCK_PERIOD_NS = 200; // 200 ns delay from CS to SCK edge

static constexpr uint16_t DIR_WRITE = 0x80;

static constexpr uint16_t Product_identification = 0x4056;
Expand Down

0 comments on commit 8d8094e

Please sign in to comment.