forked from micropython/micropython
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
CircuitPython version
Adafruit CircuitPython 9.1.2 on 2024-08-22; Adafruit Feather ESP32-C6 4MB Flash No PSRAM with ESP32C6
Code/REPL
import board
from digitalio import DigitalInOut, Direction, Pull
pwr = DigitalInOut(board.NEOPIXEL_I2C_POWER)
pwr.direction = Direction.OUTPUT
print(pwr.value)
pwr.value = True
print(pwr.value)
Behavior
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
False
True
Description
the board definition for the C6 has the pin reset function in board.c:
bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
if (pin_number == 20) {
// Turn on I2C power by default.
gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT);
gpio_set_level(pin_number, true);
return true;
}
return false;
}
but for some reason does not seem to be working. i tested an esp32-s2 and esp32-s3 feather that have the same functions and they are setting the pin high on startup, so it seems to be isolated to the C6. i discovered this while running an i2c scan and continually getting:
RuntimeError: No pull up found on SDA or SCL; check your wiring
i had assumed incorrectly that the i2c pins were included in the pins that had been changed before 9.1.2 so i hadn't looked into it more closely.
Additional information
In Arduino, the pin is automatically being set high so the pin number is correct (20).