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

stm32 and kinetis adc driver move from ISR (hrt_call_every) to new WQ #12638

Merged
merged 3 commits into from
Aug 16, 2019

Conversation

dagar
Copy link
Member

@dagar dagar commented Aug 6, 2019

@davids5 Not the bigger ADC cleanup I was hoping for, but here's a simple quick change to at least get the ADC sampling (and system_power floating point work) out of HRT.

@dagar dagar requested a review from davids5 August 6, 2019 01:08
@dagar dagar force-pushed the pr-adc_wq branch 2 times, most recently from 61f7366 to 169fa9c Compare August 6, 2019 03:00
@dagar
Copy link
Member Author

dagar commented Aug 6, 2019

The other minor changes are to bring stm32 and kinetis into sync so that we can factor out the large common portion next.

} else {
_to_system_power = orb_advertise(ORB_ID(system_power), &system_power);
}
_to_system_power.publish(system_power);

#endif // BOARD_ADC_USB_CONNECTED
}

uint16_t board_adc_sample(unsigned channel)
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dagar I think this needs to be re-thought from an atomic point of view.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which part? Are you thinking about the conversion per sample or getting multiple samples (+ system_power) gpios together?

@dagar dagar requested a review from davids5 August 15, 2019 18:30
@dagar dagar changed the title stm32/adc move from to new WQ stm32 and kinetis adc driver move from ISR (hrt_call_every) to new WQ Aug 15, 2019
davids5
davids5 previously approved these changes Aug 15, 2019
Copy link
Member

@davids5 davids5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this on and F4 and F7 and K66?
adc test

src/drivers/stm32/adc/adc.cpp Outdated Show resolved Hide resolved
@dagar
Copy link
Member Author

dagar commented Aug 16, 2019

No change in adc test results relative to master.

@dagar dagar merged commit acc7067 into master Aug 16, 2019
@dagar dagar deleted the pr-adc_wq branch August 16, 2019 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants