[go: up one dir, main page]

Skip to content
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

incomplete definition of GPIO's for EDGE #464

Open
paulvha opened this issue May 17, 2022 · 0 comments
Open

incomplete definition of GPIO's for EDGE #464

paulvha opened this issue May 17, 2022 · 0 comments

Comments

@paulvha
Copy link
Contributor
paulvha commented May 17, 2022

If people want to use the pinName or pinNumber for pinMode(), digitalWrite(), digitalRead() based on the schematics, the setting will fail. Also using a standard blink sketch will fail with NO Blink happening :

void setup() {

  Serial.begin(115200);
  pinMode(46, OUTPUT);

}

void loop() {

  digitalWrite(46, HIGH);   // turn the LED on (HIGH is the voltage level)
  Serial.println("low");

  delay(1000);                       // wait for a second

  digitalWrite(46, LOW);    // turn the LED off by making the voltage LOW
  Serial.println("high");

  delay(1000);                       // wait for a second
} 

Root cause
Only the 4 external available GPIO's are defined.

Solution
The solution is to extend the 'variantPinStates' structure in the ../../variant/edge/config/pins.cpp. This will allow that ALL the connected GPIO's on the edge can be addressed. I have created a pull request for that.(#465)

Next to that the ../../cores/mbed-os/targets/TARGET_Ambiq_Micro/TARGET_Apollo3/TARGET_SFE_EDGE/PinNames.h needs to be adjusted. Attached in the updated file.
PinNames.zip

regards,
Paul

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

No branches or pull requests

1 participant