Skip to content

Support Arduino Portenta C33 #303

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

Merged
merged 1 commit into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/local/BLELocalDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ int BLELocalDevice::begin()
// BT_REG_ON -> HIGH
pinMode(BT_REG_ON, OUTPUT);
digitalWrite(BT_REG_ON, HIGH);
#elif defined(ARDUINO_PORTENTA_C33)
#define NINA_GPIO0 (100)
#define NINA_RESETN (101)
pinMode(NINA_GPIO0, OUTPUT);
pinMode(NINA_RESETN, OUTPUT);
Serial5.begin(921600);

digitalWrite(NINA_GPIO0, HIGH);
delay(100);
digitalWrite(NINA_RESETN, HIGH);
digitalWrite(NINA_RESETN, LOW);
digitalWrite(NINA_RESETN, HIGH);
auto _start = millis();
while (millis() - _start < 500) {
if (Serial5.available()) {
Serial5.read();
}
}
//pinMode(94, OUTPUT);
//digitalWrite(94, LOW);
#endif


Expand Down
2 changes: 2 additions & 0 deletions src/utility/HCIUartTransport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
// SerialHCI is already defined in the variant
#elif defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION)
#define SerialHCI Serial2
#elif defined(ARDUINO_PORTENTA_C33)
#define SerialHCI Serial5
#else
#error "Unsupported board selected!"
#endif
Expand Down