Waveshare e-paper display, spi, zephyr, nrf52840dk

We would like to develop for the waveshare 1.02 e-paper display. We have limited experience with SPI on Zephyr and are looking for the easiest way to get a "hello world" result using nrf52840dk.

Our plan (unless you suggest otherwise) is to use the  paper-shield and the 1.02inch display.

https://www.waveshare.com/product/displays/e-paper/e-paper-shield-b.htm
https://www.waveshare.com/1.02inch-e-Paper.htm


I don't see anything obvious to get started with Zephyr/Nordic. I am hoping for a "waveshare hello world" to jumpstart our development. Can you suggest the best sample and/or any additional guidance? 

Parents Reply
  • Hi,

    mej7000 said:

    Can you confirm what SPI pins to use?

    Regarding the SPI pins, you can use any free available gpio pin (consult with the PS for the 52840DK to see which GPIOs are not in use by default, which are used by some peripherals i.e not free to use without disabling something else) and the board files for the nRF52840dk located in <ncs_installation>zephyr/boards/nordic/nrf52840dk_nrf52840.dts can be used to verify how it is set up by default.

    mej7000 said:
    It looks like both SPI1 and SPI3 are enabled by default on the 52840dk

    The SPI definitions enabled by default on the 52840DK can be seen here: https://github.com/nrfconnect/sdk-zephyr/blob/41095df79d11e081ea96d150fbe3dbd93f73af6c/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts#L206C1-L304C3, which includes those instances of the peripheral you mention.

    If you wish to change which GPIOs the SPI instances should use, you can change them using an overlay file as explained in lesson 2 of the fundamentals course and showcased how it's used in the intermediate course (There is also a dedicated SPI course in lesson 5)

    mej7000 said:
    I don't see a custom device tree in your sample for the nrf52840, so I imagine it's one of these default SPI definitions?

    Helmut can probably answer this themselves as well, but in general yes, this is the case. Unless you have modified the board file directly, meaning that you've modified "a SDK file" and not a "project-dedicated board file" and there are no existing overlay files, then it is the default board file that is the one being used

    I strongly recommend you having a look at both the fundamentals and intermediate course to get a head start on your project using NCS/Zephyr in addition to the sample Helmut has created

    Kind regards,
    Andreas

Children
  • Yes, I agree. I have both the fundamentals and intermediate certifications and they are really helpful in understanding the concepts. Still have so much more to learn, but in this case it's more the specifics of the implementation that is causing us issue.

    Also, DSHIELD is new to us and I don't remember that being covered in the certifications. It appears that DSHIELD is responsible for creating an overlay for the Waveshare display...?

Related