Nice to know you got it working. Now you need to investigate why does
check your configuration.
I think it is really easy to fix. Change the
CONFIG_NFILE_DESCRIPTORS=8 or bigger.
I2C, but probably a system configuration.
error value returned by register_driver().
Post by ***@yahoo.com [nuttx]
I posted a image, I thought it was attached.
Finally I was be able to solve it!!
There was a few problems it will try to explain here if I can help to
someone with the same problem, but maybe my main problem was my lack of
-The configuration in the menuconfig was correct. The sensor and I2C
debugging options are very good allies.
-When you want to know the assigned pin to anything I would recommend you to
see the pin map file in the configuration, because I was following the pin
assent of the board datasheet and it was different of the pin assignment in
the configuration. (For the olimex-stm32-e407 I2C1 is on PB6 and PB7 instead
PB8 and PB9)
At the moment, I already the problem of I'm be able to register the device
to use with open/close/read/write. I know that It's obligatory use this way
to use correctly NuttX but returns me an error at the time of registration
of the device.
But at the moment I only want to know if the I2C works, so to have the data
that I wanted I do the next things in the hello example and in the BMP180
driver (I repeated it's not correct, but It's just to try and check the I2C,
if you can't register the drivers)
ret = register_driver(devpath, &g_bmp180fops, 0666, priv);
if (ret < 0)
snerr("ERROR: Failed to register driver: %d\n", ret);
To avoid the fail registration and also I added this at the botton of the
sninfo("BMP180 driver loaded successfully!\n");
To check every 0.5s the pressure and the temperature.
Thank you so much for the help Alan!
One last question if you let me.
There is any specifically option, that you must check to enable the device
registration? Because I can't even register the gpio