Arduino Zero Based Board - USART on USB Pins

Hi there,

I have been given the task of getting a board designed by someone else that was based on the Arduino Zero working. It is a low power device with many sensors running at a core voltage of 1V8. Unfortunately during the development of the board the designer neglected to realise that the USB communications on the native port require a core voltage of 3V3 so it is now my task to hack around this mistake with software :o .

It isn't possible to up the core voltage of the board as there are many non 3V3 tolerant parts on the board, nor is it possible to level shift the USB as from what I can tell the module in the SAMD21 isn't even enabled.

Now this board doesn't have many breakout pins as it is very small, so the solution I have come up with is to switch the native USB function with a USART module by reconfiguring the SERCOM and then using a 1V8 tolerant UART to USB cable to convert the signals to the computer. However I am running into difficulty setting everything up. I have been following the Adafruit guide here. From what I can tell it should be a case of doing similar to that guide but with the USB pins 24 and 25.

I have identified the D_USB- pin (PA24/Pin 33) to be suitable for the USART_TX functionality on PAD 2 of SERCOM3 and SERCOM5. Likewise the D_USB+ pin (PA25/Pin 34) should work as the USART_RX on PAD 3 of either SERCOM 3/5. However it does not seem to be working. Does anyone have any experience in doing this type of thing before? Any assistance would be gratefully accepted. I am able to toggle the USB pins as a GPIO from experiments, but USART data seems to be escaping me so far.

I would prefer to keep within the Arduino environment as the board will be using many libraries that would be a pain to get working differently and also I run a macOS setup right now and as far as I can tell Atmel studio doesn't run on it. If theres any other place where this question may make more sense to be asked that would also be good to know.

Cheers!

DON'T CROSS-POST: http://forum.arduino.cc/index.php?topic=546352

Other thread removed.

Sorry, it wouldn't let me move/delete the other one and this was a much more active forum. Thanks for sorting it :)

Fixed it! I was confusing the Arduino pin names with the port pins on the SAMD. You also need to put the pinPeripheral(); lines after the serial begin lines otherwise it doesn't work for some reason.

Thank you for the follow-up.

Would you mind posting a short example for the benefit of others who find this thread?