change dac dma from circular to normal using HAL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-04 02:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-05 03:03 AM
no. why ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-05 12:27 PM
Because in some sections of my application I want the dac to output continuous waveforms from a lookup table and in other sections I want it to output a single pass of a lookup table in response to an event. What I now have found to work is:
((DMA_Stream_TypeDef *)hdma_dacX_chx.Instance)->CR |= 0x100;
For continuous output, bit 8 set selects continuous and
((DMA_Stream_TypeDef *)hdma_dacX_chx.Instance)->CR |= ~0x100;
For one shot output, bit 8 reset selects normal, X is the dac and x is the channel.
The reference manual indicates the bit 8 information but getting to it using HAL definitions required some investigation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-05 03:24 PM
>((DMA_Stream_TypeDef *)hdma_dacX_chx.Instance)->CR |= ~0x100;
No. &=.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-06 05:45 AM
Yes, my bad.