Skip to content

Change reconfigure pin for nicla vision #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fabik111
Copy link
Collaborator

Change the reconfiguration pin of Nicla vision from pin D2 to pin PA_13 (39)

@fabik111 fabik111 requested a review from pennam July 30, 2025 08:47
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.27%. Comparing base (1b4ad0f) to head (49f96f8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #18   +/-   ##
=======================================
  Coverage   90.27%   90.27%           
=======================================
  Files           7        7           
  Lines         720      720           
  Branches       86       86           
=======================================
  Hits          650      650           
  Misses         70       70           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Memory usage change @ 49f96f8

Board flash % RAM for global variables %
arduino:mbed_giga:giga 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_nicla:nicla_vision 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_opta:opta 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:renesas_uno:unor4wifi 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board examples/NetworkConfiguratorDemo
flash
% examples/NetworkConfiguratorDemo
RAM for global variables
%
arduino:mbed_giga:giga 0 0.0 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0
arduino:mbed_nicla:nicla_vision 0 0.0 0 0.0
arduino:mbed_opta:opta 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:renesas_portenta:portenta_c33 0 0.0 0 0.0
arduino:renesas_uno:unor4wifi 0 0.0 0 0.0
arduino:samd:mkrwifi1010 0 0.0 0 0.0
arduino:samd:nano_33_iot 0 0.0 0 0.0
Click for full report CSV
Board,examples/NetworkConfiguratorDemo<br>flash,%,examples/NetworkConfiguratorDemo<br>RAM for global variables,%
arduino:mbed_giga:giga,0,0.0,0,0.0
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0
arduino:mbed_nicla:nicla_vision,0,0.0,0,0.0
arduino:mbed_opta:opta,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,N/A,N/A,N/A,N/A
arduino:renesas_portenta:portenta_c33,0,0.0,0,0.0
arduino:renesas_uno:unor4wifi,0,0.0,0,0.0
arduino:samd:mkrwifi1010,0,0.0,0,0.0
arduino:samd:nano_33_iot,0,0.0,0,0.0

@@ -97,7 +97,7 @@

#if defined(ARDUINO_NICLA_VISION)
#define NETWORK_CONFIGURATOR_COMPATIBLE 1
#define PIN_RECONFIGURE 2
#define PIN_RECONFIGURE 39 // PA_13

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to call it A1 as in the documentation (pin numbers are unstable)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The analog pins are not working, we found the pin PA_13 that works. For using a label we should have used a translation function that usually we don't have, so we have prefered put the pin number with the label in the comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested A0 yesterday and it was working on a basic sketch, let me check with the full thing. Moreover, PA13=SWD is not a real pin but a "fin" between pins, so I strongly recommend NOT to use it for any reason except during manufacturing

Copy link

@facchinm facchinm Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sketch works as intended, with a button connected to A0 (the uppermost pin, close to the reset button and the LED)

int i = 0;
void _pressedCallback() {
  digitalWrite(LED_BUILTIN, i % 2 == 0 ? LOW : HIGH);
  i++;
}

// the setup function runs once when you press reset or power the board
void setup() {
  pinMode(A0, INPUT_PULLUP);
  pinMode(LED_BUILTIN, OUTPUT);
  attachInterrupt(A0, _pressedCallback, CHANGE);
  digitalWrite(LED_BUILTIN, HIGH);
  Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  delay(1000);
  Serial.println(i);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants