adc & dma problem in stm32f103
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-23 3:22 PM
Hi
I want to use dma and adc in such a way that the samples taken in a thousandth array are written. But this action only once and with my command, and then stop to issue the next command. Additionally, the adc speed is at its highest. Please guide me how to set the cubemx and what code to write. I apologize for the mistakes of sentences. I'm not fluent in English.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-27 8:31 AM
Please answer. tnks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-27 4:07 PM
do you have a sample cube file ?
its easy to do...
post your sample cube file here, I will show you the coding points / methodology
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-27 6:41 PM
Hi
Thanks for answer
This is my cubemx and main.c file:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-11-27 8:17 PM
this is the code to get the data; I hacked this together, I have more than one channel running, my code is different
extern 'C' void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc){ HAL_ADC_Channel_Buffer [Counter] = ADC_DMABuffer[0]; Counter ++ &= 0xff;//256 byte buffer autoamtically loaded by the ADC callback } �?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
________________
Attachments : Sample F103C8 ADC.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyHR&d=%2Fa%2F0X0000000b5V%2FA.Og1waA6hJ0Fxhl0DmV7G_GIZG2sZ6gTDsY33mtATk&asPdf=false
