Skip to content

Instantly share code, notes, and snippets.

@ciniml
Last active August 16, 2022 18:55
Show Gist options
  • Save ciniml/bd2bb4dea22a55c067ca6790ad0c3eae to your computer and use it in GitHub Desktop.
Save ciniml/bd2bb4dea22a55c067ca6790ad0c3eae to your computer and use it in GitHub Desktop.
Wio Terminal Grove UART
#include <wiring_private.h>
static Uart Serial3(&sercom3, PIN_WIRE_SCL, PIN_WIRE_SDA, SERCOM_RX_PAD_1, UART_TX_PAD_0);
void setup() {
Serial.begin(115200);
while(!Serial);
Serial3.begin(115200);
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT);
pinPeripheral(PIN_WIRE_SDA, PIO_SERCOM_ALT);
}
void loop() {
Serial3.println("test");
delay(1000);
}
void SERCOM3_0_Handler()
{
Serial3.IrqHandler();
}
void SERCOM3_1_Handler()
{
Serial3.IrqHandler();
}
void SERCOM3_2_Handler()
{
Serial3.IrqHandler();
}
void SERCOM3_3_Handler()
{
Serial3.IrqHandler();
}
#include <wiring_private.h>
// GROVE right port
// This disables internal I2C port, which is connected to internal 3-axis accelerometer
static Uart Serial3(&sercom4, D1, D0, SERCOM_RX_PAD_1, UART_TX_PAD_0);
void setup() {
Serial.begin(115200);
while(!Serial);
Serial3.begin(115200);
pinPeripheral(D0, PIO_SERCOM_ALT);
pinPeripheral(D1, PIO_SERCOM_ALT);
}
void loop() {
Serial3.println("test");
delay(1000);
}
void SERCOM4_0_Handler()
{
Serial3.IrqHandler();
}
void SERCOM4_1_Handler()
{
Serial3.IrqHandler();
}
void SERCOM4_2_Handler()
{
Serial3.IrqHandler();
}
void SERCOM4_3_Handler()
{
Serial3.IrqHandler();
}
@lucadentella
Copy link

;) grazie! I received a test unit from Seeed and I found your same issue. BTW I received a first message from the support and they seem to confirm my idea (pins swapped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment