Any way to confirm that the RP2040 version of the ATP chipset can in fact use D0 and D1 as RX and TX for UART / SERCOM serial that by definition is already part of the backend of programming by SparkFun? Almost 100% sure it is by default and worst case by simply letting you reconfigure the pins yourself as the RP2040 is much more open to letting you do that but the hardware we ordered is still a few days out so we cannot test it just yet. Figured out a while ago that both Adafruit and Sparkfun don’t always really configure the prior Arduino code in a way that really thoroughly defines things outside of the most default serial port once things moved to M0 or M4.
Things like the Adafruit example of code located at \AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.4\variants\feather_m4 for example. Specifically the variant.cpp file.
Notice how they defined SERCOM5 for Serial1 and that’s it? You would need to manually define more than Serial1 if you want to use a second UART, basically. It’s not something that you can just add to your main file and have it suddenly work, unfortunately.
Here is the other relevant code in that file. Serial2 is not defined there at all for example. It certainly can be done but you will not only have to modify that above file but also continue to modify it once you update the IDE or other environment prior to updating your code each time, otherwise it will not compile correctly.
This code, again from the variant.cpp file is what basically defines the RX/TX pins.
// 0…13 - Digital pins
// ----------------------
// 0/1 - SERCOM/UART (Serial1)
{ PORTB, 17, PIO_SERCOM, PIN_ATTR_PWM_G, No_ADC_Channel, TCC0_CH4, NOT_ON_TIMER, EXTERNAL_INT_1 }, // RX: SERCOM5/PAD[1]
{ PORTB, 16, PIO_SERCOM, PIN_ATTR_PWM_G, No_ADC_Channel, TCC0_CH5, NOT_ON_TIMER, EXTERNAL_INT_0 }, // TX: SERCOM5/PAD[0]
also
Uart Serial1( &sercom5, PIN_SERIAL1_RX, PIN_SERIAL1_TX, PAD_SERIAL1_RX, PAD_SERIAL1_TX ) ;
void SERCOM5_0_Handler()
{
Serial1.IrqHandler();
}
void SERCOM5_1_Handler()
{
Serial1.IrqHandler();
}
void SERCOM5_2_Handler()
{
Serial1.IrqHandler();
}
void SERCOM5_3_Handler()
{
Serial1.IrqHandler();
}
Again, we get that those examples are, well, examples for M4 hardware and not RP2040 but is there a similar codebase for the ATP hardware that is specifically RP2040 chip related? Looking at https://github.com/sparkfun/MicroMod_Processor-RP2040 there isn’t anything similar there. Are we still waiting for Arduino to push things over, at least for the Arduino side? But what about CircuitPython code for this ATP hardware? Is that currently available?
There is one https://datasheets.raspberrypi.org/pico … on-sdk.pdf datasheet that talks about the Raspberry Pi Pico Python SDK (2.66MB) - A MicroPython environment for RP2040 microcontrollers but that’s pretty much it and that’s not really helpful here for anything related to anything Arduino based and nothing CircuitPython or really anything even MicroPython either for that matter?
Adafruit at least has some code for their CircuitPython but this is a Sparkfun product so not entirely sure if any of the CircuitPython side is likely to apply at this point in time yet?
https://github.com/adafruit/circuitpython
https://github.com/adafruit/Adafruit_Ci … hon_Bundle
Not exactly much of any code or items for the Adafruit Feather RP2040 yet though either. Maybe this is all just waiting on code to be either created or available and also waiting for Arduino to figure out what they are doing as well?
Feeling like your point of the original labels D0 and D1 being used to label the current ATP hardware are starting to get a bit irrelevant for more modern hardware but it was sort of how things were done back then and nothing has changed since then so it continues to be labeled like that?