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

Example request - alternate function mapping / pin mux #142

Closed
prosper00 opened this issue May 30, 2023 · 4 comments
Closed

Example request - alternate function mapping / pin mux #142

prosper00 opened this issue May 30, 2023 · 4 comments

Comments

@prosper00
Copy link
Contributor

prosper00 commented May 30, 2023

Some pins on the 8-pin package have multiple functions, as well as multiple assignments.

Port D4 and port D5 are both listed as available on pin 8, for example, as well as having default and remapped functions available for each. I would find it helpful to have an example showing how to select between GPIOs on that pin, as well as between the alternate functions. (e.g. an example implementation of the content discussed in chapter 7 of the RM http://www.wch-ic.com/downloads/file/358.html )

Screenshot_2023-05-30_09-47-44

@GerardoNevarez
Copy link

All default functions for these "muxed" pins are available by default. When you set, say, pin8 as UTX, you can no longer use it for programming the IC.

See the various examples that are already present, the short version is that both default and alternative functions have to be explicitly set, by changing configuration registers for each port

@dwillmore
Copy link
Collaborator

dwillmore commented May 30, 2023 via email

@prosper00
Copy link
Contributor Author

Interesting. That was my reaction - 'what if I write a 'high' to PD4 and a 'low' to PD5?' Seems likely to be a smoke-emitting configuration.

If I enable a peripheral on PD4, will it disable all the peripherals on PD5 - or do I just have to be careful?

in any case, my original question has been answered, and it's really quite simple.

Thanks!

@dwillmore
Copy link
Collaborator

dwillmore commented May 30, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants