SPI (Serial Peripheral Interface) Part 2: Programming with Zephyr, nRF52840-DK and Bosch BME280

preview_player
Показать описание
SPI (Serial Peripheral Interface) is a serial transmission protocol used for communication between microcontrollers and peripheral devices such as sensors, memories or displays. It is easy to implement and offers high transmission speed, making it a common choice for many embedded systems. In diesem Video programmieren wir SPI mit Zephyr. Wir benutzen als Hardware das Nordic nRF52840-DK und den Sensor Bosch BME280.

You can support me at Patreon:

---Hardware--------
nRF52840 DK:

Adafruit BME280:

Sparkfun Logic Analyzer:

---Software--------
nRF Connect SDK:

Logic Anlayzer PulseView:

00:00 Introduction
01:50 Connect BME280 with nRF52840-DK
06:00 Read out CHIP-ID
15:44 Read out calibration register
21:00 Set configuration register
25:00 Read uncompensated sensor values
27:40 Calculate compensated sensor values
32:40 Using chip select from Zephyr device tree
36:00 Outro

#zephyr #bme280 #spi
Рекомендации по теме
Комментарии
Автор

Thanks a lot!! Going very deep, it's just what I always wanted!! 😆😆 I have some questions though.
- The dummy address 0xff at the end, you had to use one which doesn't exist, right? Or doesn't it play a role because you don't read after 0xFF?.
- You set once that you want to oversample 8x. Does the sensor measure the whole time even if you read the values only once per second? Or every minute? Or does the sensor sample data only every time you read? And if that so, does the sensor have enough time to measure things and sends back to the controller?
- And I think the correction what you made with 0x7f was right what you said. Because the bitwise OR with 0x7f is setting the first bit to 0 and keeps every other bits.

mathicalee
Автор

This was really helpful. Thank you very much !!!!

winstonalf
Автор

Thankyou for your video....Really useful..do More Videos like these....

vigneshs
Автор

Thanks for your sharing. When do you plan to write a book ?

TzeChienChu
Автор

Hello, I did not realize, why did you not use spi_cfg.cs field? I saw that you toggle CS "manually". But why so, and not using the field .cs?

jwalkerbg
Автор

Hi, sir, I have a question. Have you tried the zephyr SPI comm with an NRF52832? I seem to have a trouble trying to communicating with a DWM1000 qorvo devboard. I manage to send 0x00, but failed to receive the chip ID, I always get

elrickmanchester
Автор

Hi, thanks for this. One question, you don't set the read bit MSB of the register address. Is there a reason for this?

MartinMurphy-wy
Автор

We are trying to connect with lsm6dsl in our custom board which has nrf52840 through SPI. Can you point us to the right tutorial or video help resources since we are unable to communicate with the IC through the example code(is using i2c) and also unable to configure it to use SPI.

thanuha
Автор

Kindly ask if this code is opened on github?

zedzhang
Автор

we are trying to write and read data on EEPROM 93C46B using nrf52832 via SPI can you help me out with how I can send commands and data using the transrecieve function.

mayureshpitale