Sv: [Article] Drag-n-Drop a NuttX App
Congrats LUP!!! Best Regards Alin Från: Tomek CEDRO Skickat: den 25 februari 2024 01:33 Till: dev@nuttx.apache.org Ämne: Re: [Article] Drag-n-Drop a NuttX App CONGRATZ LUP!! :-) -- CeDeROM, SQ7MHZ, https: //urldefense. com/v3/__http: //www. tomek. cedro. info__;!!JmoZiZGBv3RvKRSx!-A9ZICfumrvgh6F-6I8ZM23pIb6NICcElGFV4vO-3R8xzyUCeoOkq0v6cz4u4TTQcs2Uj4VXuGfYGSABmA$ ZjQcmQRYFpfptBannerStart Caution : This email originated from outside of Sony. Do not click links or open any attachments unless you recognize the sender and know the content is safe. Please report phishing if unsure. ZjQcmQRYFpfptBannerEnd CONGRATZ LUP!! :-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
Re: BMI160 on Nordic nRF52832-dk Kit
This option was already checked, but I hadn't described it completely in the previous email. System type nRF52 Peripheral Selection (*) SPI 0 <--- actually (*) SPI 0 Master Could it be this part of the code in Bringup that is wrong? struct spi_dev_s *dev = nrf52_spibus_initialize(0); ret = bmi160_register("/dev/accel0", dev); if (ret < 0) { syslog(LOG_ERR, "ERROR: bmi160_register failed: %d\n", ret); } Em seg., 26 de fev. de 2024 às 03:57, raiden00pl escreveu: > You need to specify that SPI is used as master: CONFIG_NRF52_SPI0_MASTER=y > > niedz., 25 lut 2024 o 21:22 Mauro Sollar > napisał(a): > > > Hi, > > > > I'm trying to use the BMI160 sensor with the Nordic nRF52832-dk Kit, help > > me please! > > > > Kconfig Configuration: > > > > System type > > nRF52 Peripheral Selection > > (*) SPI 0 > > Device Drivers > > (*) SPI Driver Support > > (*) SPI character driver > > (*) Sensor Device Support > > (*) Bosch BMI160 Inertial Measurement Sensor support > > IO Expander/GPIO Support > > (*) GPIO driver > > Application Configuration > > Examples > > (*) BMI160 > > > > I added the following lines to the file: > > ./boards/arm/nrf52/nrf52832-dk/src/nrf52_bringup.c > > > > > > int nrf52_bringup(void) > > { > > int ret; > > ... > > ... > > ... > > > > struct spi_dev_s *dev = nrf52_spibus_initialize(0); > > ret = bmi160_register("/dev/accel0", dev); > > if (ret < 0) > > { > > syslog(LOG_ERR, "ERROR: bmi160_register failed: %d\n", ret); > > } > > > > ... > > ... > > ... > > > > > > } > > > > Show this error: > > > > board/nrf52_bringup.c:104:27: warning: implicit declaration of function > > 'nrf52_spibus_initialize'; did you mean 'nrf52_spidev_initialize'? > > [-Wimplicit-function-declaration] > > 104 | struct spi_dev_s *dev = nrf52_spibus_initialize(0); > > | ^~~ > > | nrf52_spidev_initialize > > board/nrf52_bringup.c:104:27: warning: initialization of 'struct > spi_dev_s > > *' from 'int' makes pointer from integer without a cast > [-Wint-conversion] > > LD: nuttx > > arm-none-eabi-ld: > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > function `bmi160_getreg8': > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:87: undefined > > reference to `bmi160_configspi' > > arm-none-eabi-ld: > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > function `bmi160_putreg8': > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:145: undefined > > reference to `bmi160_configspi' > > arm-none-eabi-ld: > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > function `bmi160_getreg16': > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:205: undefined > > reference to `bmi160_configspi' > > arm-none-eabi-ld: > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > function `bmi160_getregs': > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:265: undefined > > reference to `bmi160_configspi' > > make[1]: *** [Makefile:197: nuttx] Erro 1 > > make: *** [tools/Unix.mk:546: nuttx] Erro 2 > > > > > > thanks, > > -- > > Mauro Costa Sollar > > Cel.: 31 98894-2932 > > > -- Mauro Costa Sollar Cel.: 31 98894-2932
Re: BMI160 on Nordic nRF52832-dk Kit
My mistake, I looked at the reported errors wrong. BMI160 code is broken after recent changes. Fix is here https://github.com/apache/nuttx/pull/11789 wt., 27 lut 2024 o 02:33 Mauro Sollar napisał(a): > This option was already checked, but I hadn't described it completely in > the previous email. > > System type >nRF52 Peripheral Selection > (*) SPI 0 <--- actually (*) SPI 0 Master > > Could it be this part of the code in Bringup that is wrong? > >struct spi_dev_s *dev = nrf52_spibus_initialize(0); >ret = bmi160_register("/dev/accel0", dev); >if (ret < 0) > { >syslog(LOG_ERR, "ERROR: bmi160_register failed: %d\n", ret); > } > > > Em seg., 26 de fev. de 2024 às 03:57, raiden00pl > escreveu: > > > You need to specify that SPI is used as master: > CONFIG_NRF52_SPI0_MASTER=y > > > > niedz., 25 lut 2024 o 21:22 Mauro Sollar > > napisał(a): > > > > > Hi, > > > > > > I'm trying to use the BMI160 sensor with the Nordic nRF52832-dk Kit, > help > > > me please! > > > > > > Kconfig Configuration: > > > > > > System type > > > nRF52 Peripheral Selection > > > (*) SPI 0 > > > Device Drivers > > > (*) SPI Driver Support > > > (*) SPI character driver > > > (*) Sensor Device Support > > > (*) Bosch BMI160 Inertial Measurement Sensor support > > > IO Expander/GPIO Support > > > (*) GPIO driver > > > Application Configuration > > > Examples > > > (*) BMI160 > > > > > > I added the following lines to the file: > > > ./boards/arm/nrf52/nrf52832-dk/src/nrf52_bringup.c > > > > > > > > > int nrf52_bringup(void) > > > { > > > int ret; > > > ... > > > ... > > > ... > > > > > > struct spi_dev_s *dev = nrf52_spibus_initialize(0); > > > ret = bmi160_register("/dev/accel0", dev); > > > if (ret < 0) > > > { > > > syslog(LOG_ERR, "ERROR: bmi160_register failed: %d\n", ret); > > > } > > > > > > ... > > > ... > > > ... > > > > > > > > > } > > > > > > Show this error: > > > > > > board/nrf52_bringup.c:104:27: warning: implicit declaration of function > > > 'nrf52_spibus_initialize'; did you mean 'nrf52_spidev_initialize'? > > > [-Wimplicit-function-declaration] > > > 104 | struct spi_dev_s *dev = nrf52_spibus_initialize(0); > > > | ^~~ > > > | nrf52_spidev_initialize > > > board/nrf52_bringup.c:104:27: warning: initialization of 'struct > > spi_dev_s > > > *' from 'int' makes pointer from integer without a cast > > [-Wint-conversion] > > > LD: nuttx > > > arm-none-eabi-ld: > > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > > function `bmi160_getreg8': > > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:87: > undefined > > > reference to `bmi160_configspi' > > > arm-none-eabi-ld: > > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > > function `bmi160_putreg8': > > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:145: > undefined > > > reference to `bmi160_configspi' > > > arm-none-eabi-ld: > > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > > function `bmi160_getreg16': > > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:205: > undefined > > > reference to `bmi160_configspi' > > > arm-none-eabi-ld: > > > /home/mauro/nuttxspace/nuttx/staging/libdrivers.a(bmi160_base.o): in > > > function `bmi160_getregs': > > > /home/mauro/nuttxspace/nuttx/drivers/sensors/bmi160_base.c:265: > undefined > > > reference to `bmi160_configspi' > > > make[1]: *** [Makefile:197: nuttx] Erro 1 > > > make: *** [tools/Unix.mk:546: nuttx] Erro 2 > > > > > > > > > thanks, > > > -- > > > Mauro Costa Sollar > > > Cel.: 31 98894-2932 > > > > > > > > -- > Mauro Costa Sollar > Cel.: 31 98894-2932 >