Skip to content

Commit

Permalink
Fix for bmi150 power line
Browse files Browse the repository at this point in the history
This allows to set the 3v3 vddio/vdd pin for bmi150 in order to correctly
power the bmi avoiding voltage drop in the begin
  • Loading branch information
Rocketct committed Jan 9, 2024
1 parent ff3334d commit c29417c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions variants/ARDUINO_NANO33BLE/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,18 @@ void initVariant() {
pinMode(PIN_ENABLE_I2C_PULLUP, OUTPUT);

digitalWrite(PIN_ENABLE_SENSORS_3V3, HIGH);
delay(10);
digitalWrite(PIN_ENABLE_I2C_PULLUP, HIGH);

// Set high drive pin to properly power the bmi150
nrf_gpio_cfg(
digitalPinToPinName(PIN_ENABLE_SENSORS_3V3),
NRF_GPIO_PIN_DIR_OUTPUT,
NRF_GPIO_PIN_INPUT_DISCONNECT,
NRF_GPIO_PIN_NOPULL,
NRF_GPIO_PIN_H0H1,
NRF_GPIO_PIN_NOSENSE);

// Disable UARTE0 which is initially enabled by the bootloader
nrf_uarte_task_trigger(NRF_UARTE0, NRF_UARTE_TASK_STOPRX);
while (!nrf_uarte_event_check(NRF_UARTE0, NRF_UARTE_EVENT_RXTO)) ;
Expand Down

0 comments on commit c29417c

Please sign in to comment.