Hi Matt,

Sorry my delay to reply.

As Mr. Greg pointed the issue is related to your OLED display I2C address.

Normally these OLED display has an Address Select using a 0R resistor
to 0x78 or 0x7A.

You need to setup the CONFIG_SSD1306_I2CADDR with the right address.

Also as Mr. Ben suggested, using the i2ctool you can scan your I2C bus
and find the I2C address that your display is using.

Any issue, please let us to know.

BR,

Alan

On 12/4/20, Matt DeWall <mdew...@gmail.com> wrote:
> Didn't know about that one, thanks!  Found one of Alan's articles for that
> and gonna give that a shot.
>
> Matt
>
> On Fri, Dec 4, 2020 at 5:01 PM Disruptive Solutions <
> disruptivesolution...@gmail.com> wrote:
>
>> Did you try the i2c tool?
>>
>> Op za 5 dec. 2020 1:58 a.m. schreef Matt DeWall <mdew...@gmail.com>:
>>
>> > Got it.  Ok - looks like my 116 errors were from my later
>> > experimenting.
>> > If I completely disconnect or try other i2c pins, I get 116, so that
>> makes
>> > sense.
>> >
>> > So it looks like when I connect the pins correctly I'm getting the 6
>> error.
>> >
>> > I'm wondering if that just means somehow my device has an i2c address
>> that
>> > isn't the default that the driver is looking for?
>> >
>> > Mat
>> >
>> > On Fri, Dec 4, 2020 at 4:25 PM Gregory Nutt <spudan...@gmail.com>
>> > wrote:
>> >
>> > > Should have mentioned that the error code 6 is defined in
>> > include/errno.h:
>> > >
>> > >     #define ENXIO               6
>> > >     #define ENXIO_STR           "No such device or address"
>> > >
>> > > And errcode code 116 is:
>> > >
>> > >     #define ETIMEDOUT           116
>> > >     #define ETIMEDOUT_STR       "Connection timed out"
>> > >
>> > > Which is also reported by as an I2C failure by stm32_i2c_transfer():
>> > >
>> > >        if (stm32_i2c_sem_waitdone(priv) < 0)
>> > >          {
>> > >            status = stm32_i2c_getstatus(priv);
>> > >            ret = -ETIMEDOUT;
>> > >
>> > > On 12/4/2020 6:19 PM, Gregory Nutt wrote:
>> > > >
>> > > > 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