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

SAM sercom UART only works for some pin mappings #915

Closed
chris-durand opened this issue Sep 15, 2022 · 0 comments · Fixed by #827
Closed

SAM sercom UART only works for some pin mappings #915

chris-durand opened this issue Sep 15, 2022 · 0 comments · Fixed by #827
Labels
Milestone

Comments

@chris-durand
Copy link
Member

The SAM sercom peripheral has 4 peripheral signals PAD[0] to PAD[3] whose functions can be assigned in the driver. For example the D21 sercom UART allows to assign either PAD[0] or PAD[2] as UART TX pin:

sercom_d21_mapping

Currently the configuration is hard-coded in the driver to one specific case:

// Set rx/tx pins
{{ peripheral }}->USART.CTRLA.bit.RXPO = 0x3; // Pad3
{{ peripheral }}->USART.CTRLA.bit.TXPO = 0x1; // Pad2;

These registers have to be set according to the provided pins in the UART connect() method.

@chris-durand chris-durand added this to the 2022q3 milestone Sep 15, 2022
@chris-durand chris-durand linked a pull request Sep 16, 2022 that will close this issue
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

1 participant