Skip to content

disable adc channels while reconfiguring #135

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

Merged
merged 5 commits into from
Mar 2, 2020
Merged

disable adc channels while reconfiguring #135

merged 5 commits into from
Mar 2, 2020

Conversation

oclyke
Copy link
Contributor

@oclyke oclyke commented Feb 27, 2020

Addresses #131

@oclyke oclyke requested a review from nseidle February 27, 2020 16:40
@nseidle
Copy link
Member

nseidle commented Feb 27, 2020

I can't get the analog example to work on this PR but master works. I'm testing on ATP with trimpot, A29. What's your test setup?

@oclyke
Copy link
Contributor Author

oclyke commented Feb 28, 2020

@paulvha I am also seeing the same results. The addition of am_hal_adc_disable in the ap3_change_channel routine appears to prevent the ADC from operating correctly.

Have you tested the changes that you suggest in #131? If so can you tell from the diffs of this PR what the culprit may be?

Without taking more time to dive into this I can't tell what exactly the issue is. Perhaps ADC startup time?

@paulvha
Copy link
Contributor

paulvha commented Feb 28, 2020

I have tested both and left it in my code work correctly. Let me try to do a pull request and sent an update. I used this on couple of different ADC lines.

@paulvha
Copy link
Contributor

paulvha commented Feb 28, 2020

Hi Owen,

I have reviewed but it is missing a couple of things. I can not create a pull request to handle, Attached, I hope, the ap3_analog_cpp in the zip. Search on PVH (in capitals) and you will find the places to change ( 7 lines of info)
ap3_analog.zip

regards,
Paul

Owen L - SFE added 3 commits March 2, 2020 10:39
(they're just awfully annoying!)
first get any active interrupts into the interrupt mask
@oclyke
Copy link
Contributor Author

oclyke commented Mar 2, 2020

@paulvha the error in the original PR was that the method used to correctly set the interrupt mask (am_hal_adc_interrupt_status) only looked for interrupt flags enabled in the HAL layer. Changing this option to return any interrupt flag solved the problem. I'm going to merge these changes now.

Thanks a ton for your contribution!

@oclyke oclyke merged commit 28df6db into master Mar 2, 2020
@oclyke oclyke deleted the adc-enable-order branch March 2, 2020 17:47
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.

3 participants