kriswiner / nRF52832DevBoard

15 stars 3 forks source link

No I2C device is found #4

Open radleypr opened 6 years ago

radleypr commented 6 years ago

Hi Kris,

I bought the nrf52832 from Pesky Product and I tried to program the built-in MPU9250 using your code "MPU9250_BMP280_BasicAHRS_nRF52 Basic Example Code". However I am getting an error message saying there are no I2C devices found. My understanding is that the connections for SDA and SCL pin is 6 & 7 in the code, but it is connected by default inside the board, so I just have to program the board using debugger from NRF52 DevKit board. I am also using SandeepMistry's arduino core library to program the nrf52832. Could you help me identify what can be the error ?

whatsapp image 2018-07-27 at 12 30 08 pm

kriswiner commented 6 years ago

You are going to hve to change the varant .cpp file or maybe .h file to correspond o the pins on the board to get this to work. Dumb Arduino core design especially for I2C where the position in the ,h is fixe so the pin numbers have tp be edited.

On Thu, Jul 26, 2018 at 9:39 PM, radleypr notifications@github.com wrote:

Hi Kris,

I bought the nrf52832 from Pesky Product and I tried to program the built-in MPU9250 using your code "MPU9250_BMP280_BasicAHRS_nRF52 Basic Example Code". However I am getting an error message saying there are no I2C devices found. My understanding is that the connections for SDA and SCL pin is 6 & 7 in the code, but it is connected by default inside the board, so I just have to program the board using debugger from NRF52 DevKit board. I am also using SandeepMistry's arduino core library to program the nrf52832. Could you help me identify what can be the error ?

[image: whatsapp image 2018-07-27 at 12 30 08 pm] https://user-images.githubusercontent.com/40554862/43301754-9ac03e06-9199-11e8-82b8-5fb3d0883462.jpeg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kriswiner/nRF52832DevBoard/issues/4, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qhY41RceFlSjnFrshWf-F-G9yJFFks5uKplygaJpZM4Vi5wi .

radleypr commented 6 years ago

I used Nordic Development Kit with MPU9250 with connections as SDA,SCL - 26,27 AD0 - GND INT - P0.17 VCC - 3.3V GND - GND and it works fine. I am a bit confused on what to change with the variant.cpp and .h when I use the NRF52 DevBoard. Would you mind posting the documentation ? I see from the schematics that SDA SCL is pin 6 and 7, but I am not sure about the interrupt pin because in the schematics it seems to be pin 10 but from the description is it changed to pin 8 ? What would be the configurations if I want to migrate from Nordic NRF52 DK to your NRF52 DevBoard which has built in MPU9250 ? Thank you.

kriswiner commented 6 years ago

Better if you modify the variant files yourself since how you do it depends on which pins you choose for UART, leds, etc. But I've enclosed the ones I use with the Nordic DK board variant when using my nRF52 development board. The idea is that the variant.h files defines the functions according to the pin order, so in the .cpp file you have to swap pins into the appropriate slot to get them to work. Poor design, but this is what Mistry did and it makes some sense for an MCU with a multiplexed GPIO buffer.

In this varian.cpp, pin D0 is the MPU9250 interrupt (P0.8).

On Fri, Jul 27, 2018 at 1:53 AM, radleypr notifications@github.com wrote:

I used Nordic Development Kit with MPU9250 with connections as SDA,SCL - 26,27 AD0 - GND INT - P0.17 VCC - 3.3V GND - GND and it works fine. I am a bit confused on what to change with the variant.cpp and .h when I use the NRF52 DevBoard. Would you mind posting the documentation ? I see from the schematics that SDA SCL is pin 6 and 7, but I am not sure about the interrupt pin because in the schematics it seems to be pin 10 but from the description is it changed to pin 8 ? What would be the configurations if I want to migrate from Nordic NRF52 DK to your NRF52 DevBoard which has built in MPU9250 ? Thank you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/nRF52832DevBoard/issues/4#issuecomment-408356238, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qgTQE3Z0zu8hetQ78taMUoBjcKkmks5uKtUigaJpZM4Vi5wi .

radleypr commented 6 years ago

Hi Kris,

I finally have solved the problem, it is indeed because of the variant files as well as changing the variant library to NRF51 version.

I just have one more question, is there a regulator connected to 3.3V pin at the board ? Because I want to power the board with 4 AA batteries (6V). Could you suggest an appropriate way to power up the board with batteries ?

kriswiner commented 6 years ago

You may power the board directly from two (2) AA or AAA batteries using the 3V3 port on the board edge or you may power the board from three AA or AAA batteries using the +/- battery port. The battery port goes through an LDO whose Vmax is 5.5 V. The board viltage shouldn't be above 3.6 V and the board will run fine at 3.0 V.

On Mon, Jul 30, 2018 at 6:42 AM, radleypr notifications@github.com wrote:

Hi Kris,

I finally have solved the problem, it is indeed because of the variant files as well as changing the variant library to NRF51 version.

I just have one more question, is there a regulator connected to 3.3V pin at the board ? Because I want to power the board with 4 AA batteries (6V). Could you suggest an appropriate way to power up the board with batteries ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kriswiner/nRF52832DevBoard/issues/4#issuecomment-408867491, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY1qiqV4d1SnQfbFK4I4Vy9MhLqHTVJks5uLw0_gaJpZM4Vi5wi .

radleypr commented 6 years ago

Thank you, Kris