-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
tests: drivers: dac channel structure has a buffered parameter boolean #58932
Conversation
Add the '.buffered' field to the dac_channel_cfg structure when testing the DAC. This boolean parameter is initialised to 'true' to PASS the test. It follows the zephyrproject-rtos#57730 Also changed for the samples/drivers/dac Signed-off-by: Francois Ramu <[email protected]>
|
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.
The issue does not seem to be the not enabled buffer, but incorrect output configuration. We just didn't realize this before, as an enabled buffer automatically connects the DAC to the external pin.
I think we should use LL_DAC_SetOutputConnection
to fix the driver instead.
Do you mean LL_DAC_SetOutputBuffer( ... OutputBuffer ... ) |
Yes, I think that would be the correct way. What do you think? |
That's better, but initializing the
|
I have tested with Regarding the original discussion whether the output buffer is needed or not: I have checked the impedance of the DAC and the ADC in the STM32L072 datasheet. DAC ADC They are quite close and without a capacitor the DAC impedance does indeed seem to be too high to drive the ADC. I have added a 100 nF capacitor and it works even without the buffer. As we don't have the cap in standard Nucleo boards I agree to enable the buffer, now that I understand why it doesn't work without the buffer. |
Add the '.buffered' field to the dac_channel_cfg structure when testing the DAC.
This boolean parameter is initialised to 'true' to PASS the test.
It follows the #57730
Fixes #58931
Signed-off-by: Francois Ramu [email protected]