<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Failed to perform SPI read function on nRF52840dk with BMI270 sensor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116707/failed-to-perform-spi-read-function-on-nrf52840dk-with-bmi270-sensor</link><description>Hello, 
 I am trying to use SPI driver to read BMI270 IMU data on my nRF52840dk. I stucked at verifying the sensor ID step. According to the datasheet, sensor ID is stored at register 0x00 and has a default value of 0x24. But I always read a 0x00. 
 I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Nov 2024 13:28:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116707/failed-to-perform-spi-read-function-on-nrf52840dk-with-bmi270-sensor" /><item><title>RE: Failed to perform SPI read function on nRF52840dk with BMI270 sensor</title><link>https://devzone.nordicsemi.com/thread/512133?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 13:28:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a05c8747-ba19-466b-83b0-74ed0cd907e8</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;Problem solved: I misunderstand the buffer management in bmi_read_reg function. I only set rx_spi_bufs as 1D but as a matter of fact it should be 2D, where rx_spi_bufs[0] is the dummy byte part of length 2 because of the additional dummy byte generated from the sensor and the byte received during writing operation. And rx_spi_bufs[1] should be the actual data of length size.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Failed to perform SPI read function on nRF52840dk with BMI270 sensor</title><link>https://devzone.nordicsemi.com/thread/512095?ContentTypeID=1</link><pubDate>Tue, 26 Nov 2024 12:23:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e721b3d-d61d-443e-84c4-2221b273dff6</guid><dc:creator>Shuhao Dong</dc:creator><description>&lt;p&gt;After reading the datasheet again, reading BMI270 sensor via SPI will always give a dummy byte between command byte and data byte. So when to use transeive function, I should read 3 bytes (command, dummy, data) rather than 2. I tried to read 3 bytes but it is still reporting 0s for all 3 bytes.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>