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

Fix/adc #433

Merged
merged 3 commits into from
Feb 27, 2023
Merged

Fix/adc #433

merged 3 commits into from
Feb 27, 2023

Conversation

ttmut
Copy link
Contributor

@ttmut ttmut commented Feb 21, 2023

This PR modifies the ADC example to read an external analog input.

According to the datasheet 10-bit ADC supports four external analog inputs.

  1. AIN12-P2.4-Channel 4
  2. AIN13-P2.5-Channel 5
  3. AIN14-P2.6-Channel 6
  4. AIN15-P2.7-Channel 7

These pins are routed to JH5 connector on the EvKit. I updated the example to read AIN12.

The adcfrq field in GCR_PCLKDIV is four bits wide ([13:10]) so fix that too in relevant header files.

GCR_PCLKDIV.adcfrq is 4 bits wide however it is listed as 3 bits wide in
MAX32655, MAX32680 and MAX78000 header and svd files.
MAX32680 datasheet states that the 10-bit ADC has four external inputs
labelled from AIN12 to AIN15. Their corresponding channels are given as
CH4 to CH7.

Update the example to monitor AIN12,CH4 which is routed to JH5:4 on EvKit.
@ttmut ttmut requested a review from ozersa February 21, 2023 09:53
@Jake-Carter Jake-Carter merged commit 27979fe into main Feb 27, 2023
@Jake-Carter Jake-Carter deleted the fix/adc branch February 27, 2023 20:49
Jake-Carter pushed a commit that referenced this pull request Mar 7, 2023
* Fix width of adcfrq field in peripheral clock divisor register

GCR_PCLKDIV.adcfrq is 4 bits wide however it is listed as 3 bits wide in
MAX32655, MAX32680 and MAX78000 header and svd files.

* MSDK-944: Update ADC example to read external analog input

MAX32680 datasheet states that the 10-bit ADC has four external inputs
labelled from AIN12 to AIN15. Their corresponding channels are given as
CH4 to CH7.

Update the example to monitor AIN12,CH4 which is routed to JH5:4 on EvKit.

* Fix adcfrq field in me17 and ai85 register definition files
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.

None yet

4 participants