Hello i cant use BMI270 with NRF52. Pleas Help me. Cannt found any thıng. here my code. BMI2_INTF_RETURN_TYPE bmi2_spi_read(uint8_t reg_addr, uint8_t *reg_data, uint32_t len, void *intf_ptr) { (void)(intf_ptr); static uint8_t txarr[500]; uint8_t rxarr[500]; txarr[0] = 0x80 | reg_addr; nrf_drv_spi_transfer(&spi, &txarr[0], 1, rxarr, len+1 ); for (int i = 0; i < len+1; i++) { *(reg_data + i) = rxarr[i+1]; } return BMI2_INTF_RET_SUCCESS; } BMI2_INTF_RETURN_TYPE bmi2_spi_write(uint8_t reg_addr, const uint8_t *reg_data, uint32_t len, void *intf_ptr) { (void)(intf_ptr); volatile static uint8_t txarr[5000]; txarr[0] = reg_addr; for (uint8_t i = 0; i < len; i++) { txarr[i + 1] = *(reg_data + i); } nrf_drv_spi_transfer(&spi, &txarr[0], (uint16_t)len + 1 , (void *)0, 0); return BMI2_INTF_RET_SUCCESS; }void bmi2_delay_us(uint32_t period, void *intf_ptr) { nrf_delay_us(period); }
... View more