What's it like to create #OpenSource software for brand new Prototype Hardware ... Like #PineDio Stack BL604? All shall be explained in this article
Since our #ST7789 Display doesn't respond to GFX Library 9-Bit Banging ... Maybe our display isn't hardwired for 3-Wire 9-Bit mode? Let's verify IM0 to 3 with the display maker
We run the GFX Library on Linux ... To see the data that will be transmitted to #ST7789 Display
https://github.com/lupyuen/bl_iot_sdk/blob/3wire/customer_app/pinedio_st7789_bitbang/test/test.c
Let's port moononournation's awesome 9-bit-banging GFX Library to #BL604 ... And compare the SPI Output with a Logic Analyser
Need to verify that our #ST7789 Display is hardwired for "3-line 9bit serial I/F Ⅱ" mode: IM0 = 1, IM1 = 0, IM2 = 1, IM3 = 1 🤔
Yep MISO and MOSI are now swapped! This matches the SPI Pin Definitions in #BL604 Reference Manual ... So from now on we'll always call GLB_Swap_SPI_0_MOSI_With_MISO
GPIO 4 works as MOSI but not GPIO 17 ... What if we connect GPIO 4 to 17? Nope still nothing on the #PineDio Stack ST7789 Display 🤔
Which is super strange because GPIO 4 is supposed to be MISO on #BL604 ... Not MOSI! 🤔
https://lupyuen.github.io/articles/spi#spi-data-pins-are-flipped
#BL604 doesn't seem to be transmitting anything to ST7789 on SPI MOSI (GPIO 17) ... Let's try a different pin for MOSI
ST7789's CS Pin (GPIO 20) is not exposed on #PineDio Stack's GPIO Connector ... So we use GPIO 5 to Shadow the CS Pin
#PineDio Stack SPI Port is exposed on the GPIO Connector ... So we connect our Logic Analyser there
Verifying the packed #ST7789 9-bit data with a spreadsheet ... Our packing is indeed correct 🤔
https://docs.google.com/spreadsheets/d/1Qy0MjU79s__wzTAFwpTYUUIzLWcrFnKCrvvo_rHamiE/edit?usp=sharing
IoT Techie and Educator / Apache NuttX PMC