STM32F4xx Example code bug?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-13 6:32 AM
Posted on October 13, 2015 at 15:32
In file:
...\STM32F4xx_DSP_StdPeriph_Lib_V1.6.0\Project\STM32F4xx_StdPeriph_Examples\ADC\ADC_TripleModeInterleaved\main.cIs DMA_Memory0BaseAddr really intended to be a pointer to a pointer?The variable aADCTripleConvertedValue is an array of 3 uint32_t's, so should (uint32_t)&aADCTripleConvertedValue below need a ''[0]'' appended?From the file:Declaration:/* Private variables ---------------------------------------------------------*/__IO uint32_t aADCTripleConvertedValue[3];Use: DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&aADCTripleConvertedValue;
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2015-10-13 9:16 AM
Posted on October 13, 2015 at 18:16
Actually, all three of these resolve to the same address
DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)aADCTripleConvertedValue; DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&aADCTripleConvertedValue; DMA_InitStructure.DMA_Memory0BaseAddr = (uint32_t)&aADCTripleConvertedValue[0]; I'd prefer case 3, over 1, but I think you'll find there are all valid.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
