Thanks to visit codestin.com
Credit goes to github.com

Skip to content

L4 integration: Modifications to DAC. #1937

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

Closed
wants to merge 1 commit into from

Conversation

tobbad
Copy link
Contributor

@tobbad tobbad commented Mar 27, 2016

This is a PR in a series (#1888, #1890, #1903, #1904, #1916, #1917, #1918, #1919, #1920, #1921, #1922, #1924, #1925, #1929 ) of PR to support the STM32L4 series in micropython. (see http://forum.micropython.org/viewtopic.php?f=12&t=1332&sid=64e2f63af49643c3edee159171f4a365)

Line 384-401 there were some changes due to new structure which is used to store the DMA stat in self. 384-386 I retrived the last dma which was setup on self. This dma is later deinitialized (line 407).

I am not sure what was the meaning of 400/401 which I removed from the source. I assume, that the DMA should be set up between the DAC instance number which was used in the constructor of it. In the old source there was always a DMA between DAC1 and the memory - which I assume is not the behaviour which the user assumes. Or where am I wrong?

@dhylands
Copy link
Contributor

The HAL_DMA_Init function asserts that those fields are valid. By removing lines 400 & 401, those 2 fields (Channel & Direction) are essentially initialized to random values from the stack.

@tobbad
Copy link
Contributor Author

tobbad commented Mar 28, 2016

These two fields are setup in the call to dma_init_handle in 386 to the value which the instance of this dac should use (either DAC instance 1 or 2).

BTW. This PR can not compile as it uses the dma_descr_t structure defined in dma.h. dma.h is modified in #1916 .

@pfalcon pfalcon force-pushed the master branch 6 times, most recently from 9167980 to 1cc81ed Compare April 10, 2016 22:16
@tobbad tobbad force-pushed the l4_integration_dac branch from 4c7b574 to cfa8dbe Compare April 21, 2016 16:56
@tobbad tobbad force-pushed the l4_integration_dac branch from cfa8dbe to a7871c6 Compare April 21, 2016 16:58
@tobbad
Copy link
Contributor Author

tobbad commented Apr 25, 2016

Close this PR as this changes are included in #1916.

@tobbad tobbad closed this Apr 25, 2016
@tobbad tobbad deleted the l4_integration_dac branch May 7, 2016 14:56
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.

2 participants