-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feature/adc dac io macros #180
Conversation
cd555b8
to
ab50f55
Compare
I believe this is a bug in the DAC outputs - these DMA streams should not be operating in circular mode. I believe it's not currently causing incorrect output because we schedule a new DMA transfer as soon as the last one completes, so the circular transfer configuration never gets a chance to generate incorrect data. However, this should be removed. I'll open an issue. |
Then that's a copy-paste bug par excellence, found and fixed by "don't repeat yourself" ;) |
…macros * origin/master: more nightly clippy lints clippy lints gha: clippy-check build(deps): bump paste from 1.0.2 to 1.0.3 build(deps): bump panic-semihosting from 0.5.4 to 0.5.6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor fix - other than that, a smoke test with a 1KHz test signal on the input is showing proper operation of both ADC/DAC pairs
* master: cargo: add docs for target cpu/features iir: more generic math helpers, use core::intrinsics cargo fmt [nfc] iir: vminnm/vmaxnm iir: fmt [nfc] iir: fix comment [nfc] cargo-config: cm7 features iir: copy_within is better than rotate_right processing: use faster unsafe truncate
bors r+ |
Build succeeded: |
I wanted to try macros.
This moves the ADC and DAC DMA setup into macros reducing code footprint. Hopefully no functional changes there.
I didn't test this on hardware and I may have missed differences between
Adc0
/Adc1
andDac0
/Dac1
.It removes the
AdcInputs
andDacOutputs
structs and replaces them with tuples as they were just fan-outs/fan-ins.It also does some minor tweaks in the
process()
ISR towards higher flexibility enforces some data patterns to help the compiler.Differences missing:
.transfer_complete_interrupt(true)
forAdc1
only: needed.circular_buffer(true);
forDac1
only: close DAC1 DMA stream operates in circular mode #183