As far as I can tell, this looks like an I2C problem.  Alan problem knows better than I.

I think the failure sequence is:

   fs/vfs:
        ioctl(FBIO_UPDATE)

   drivers/video/fb.c ioctl method:
        ret = fb->vtable->updatearea(fb->vtable, area);

   drivers/lcd/lcd_framebuffer.c, function lcdfb_updateearea():
        ret = pinfo->putrun(row, startx, run, width);

   drivers/lcd/ssd1306.c, putrun method:
        Calls ssd1306_sendbyte()

   arch/arm/src/stm32/stm32_i2c.c,
        else if (status & I2C_SR1_AF)
          {
            /* Acknowledge Failure */

            ret = -ENXIO;
          }

So my best guess is that there is some issue with your I2C interface.  It might be failing to acknowledge.

On 12/4/2020 4:56 PM, Matt DeWall wrote:
Hello NuttX devs!

I've followed Alan's great tutorial on setting up an OLED on the Blue Pill
stm32f103-minimum board but running into trouble.

Video:
https://www.youtube.com/watch?v=TZ4i71ArtRo&t=245s

* I've compiled, flashed, and able to get into nsh
* The fb driver is listed as /dev/fb0 and the 'fb' app is present
* When I run the 'fb' app I get repetitive errors, two different codes, but
usually '6' (sometimes '116')

--------------------------
nsh> fb
VideoInfo:
       fmt: 0
      xres: 128
      yres: 64
   nplanes: 1
PlaneInfo (plane 0):
     fbmem: 0x20002f40
     fblen: 1024
    stride: 16
   display: 0
       bpp: 1
Mapped FB: 0x20002f40
  0: (  0,  0) (128, 64)
ERROR: ioctl(FBIO_UPDATE) failed: 6
  1: ( 11,  5) (106, 54)
ERROR: ioctl(FBIO_UPDATE) failed: 6
  2: ( 22, 10) ( 84, 44)
ERROR: ioctl(FBIO_UPDATE) failed: 6
  3: ( 33, 15) ( 62, 34)
ERROR: ioctl(FBIO_UPDATE) failed: 6
  4: ( 44, 20) ( 40, 24)
ERROR: ioctl(FBIO_UPDATE) failed: 6
  5: ( 55, 25) ( 18, 14)
ERROR: ioctl(FBIO_UPDATE) failed: 6
Test finished


* I have verified that the screen is working and wired up correctly using
an Arduino Mega.
* I'm using this ssd1306 HiLet Go 128X64 OLED:
https://www.amazon.com/gp/product/B06XRBTBTB/ref=ppx_yo_dt_b_asin_title_o02_s01?ie=UTF8&psc=1
* AFAIK I've done an apples/apples with the tutorial, same board, same
screen, same wiring, but no luck.

I'm at a loss, as debugging at this low of a level is pretty foreign to
me.  It feels like I've missed something easy, but I've triple checked the
connections and config and not sure where to go from here.

Thanks!

Matt

Reply via email to