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

Rename some (wrong named) macro in samv71q-pinctrl.h for AFEC0 pins #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

zebo9x
Copy link

@zebo9x zebo9x commented Jun 7, 2024

The pin macro for SAM V71 Q relative to PE5 use as AFEC0 AD3 is now named PE5X_AFE0_AD3. Previously it was named as if it is relative to AFEC1 AD3 (PE5X_AFE1_AD3). A check can be made by reading the pinout table of ATSAMV71 for 144 pinout (datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/SAM-E70-S70-V70-V71-Family-Data-Sheet-DS60001527.pdf) (start fo the table: page 28; relevant table section: page 33, LQFP pin 28).

The pin macro for SAM V71 Q relative to PE5 use as AFEC0 AD3 is now named PE5X_AFE0_AD3. Previously it was named as if it is relative to AFEC1 AD3 (PE5X_AFE1_AD3).
A check can be made by reading the pinout table of ATSAMV71 for 144 pinout (datasheet: https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/DataSheets/SAM-E70-S70-V70-V71-Family-Data-Sheet-DS60001527.pdf) (start fo the table: page 28; relevant table section: page 33, LQFP pin 28).
@zebo9x
Copy link
Author

zebo9x commented Jun 7, 2024

note that I didn't change the comment above the macro definition

Renamed the macro for PE4 for AFEC0 AD4 functionality to actually reflect the configuration. It was previously named as if it is for AFEC1.
Update comments related to misnaming from AFEC1 to AFEC0
@zebo9x zebo9x changed the title Macro rename for samv71q-pinctrl.h PE5X AFEC0 AD3 was erroneusly AFEC1 Rename some (wrong named) macro in samv71q-pinctrl.h for AFEC0 pins Jun 7, 2024
@zebo9x
Copy link
Author

zebo9x commented Jun 7, 2024

I think the changes for AD pins for AFEC0 / AFEC1 are done.

I have tested on the EVB of ATSAMV71Q21B (the sam_v71_xult board) by using a custom board folder with inside the devicetree (common and pinctrl).
In the code I'm using the property
/zephyr,user/io-channels = <&afec0, 0>, ...;
and the propery of pinctrl/.../pinmux is a list of all the pins.

@nandojve nandojve self-assigned this Sep 7, 2024
@nandojve
Copy link
Member

nandojve commented Sep 7, 2024

Hi @zebo9x ,

Yes, you are right. There is a typo in the pinconfig file:

pe4:
pincodes: [q]
periph:
- [a, ebi, d12, [j, n]]
- [b, tc3, tiob10]
extra:
- [x, afe1, ad4]
pe5:
pincodes: [q]
periph:
- [a, ebi, d13, [j, n]]
- [b, tc3, tclk10]
extra:
- [x, afe1, ad3]

You should fix in there and regenerate the files. There are documentation in the repo that explains how it works.
Make sure you follow the code guidelines when you write the commit, you should respect brief and comments max columns.

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

Successfully merging this pull request may close these issues.

2 participants