Hello
I wanto to know that may I read ADC with 6-7MS by chibiOS? I want to build a DAQ card by STM32F4 discovery board, is there any example that show me how I must implement it by using chibiOS? in my project first of all I want to read ADC as fast as possible and store it in external memory then transmit stored data by Xbee module .
build a DAQ card by STM32F4 discovery
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: build a DAQ card by STM32F4 discovery
Hi,
The F4 ADC is not that fast.
You have to use the F3 with its ADC set in dual mode, that would give you 10MS.
Giovanni
The F4 ADC is not that fast.
You have to use the F3 with its ADC set in dual mode, that would give you 10MS.
Giovanni
Re: build a DAQ card by STM32F4 discovery
Hello Giovanni
I see an example from ST by keil that show it can read ADC about 6.2MS, here is that:
https://www.dropbox.com/sh/e5qi2z4qht85 ... -S1Ka?dl=0
but I want to read ADC as fast as possible and 10MS is very good for my application so do you have any example for STM103 by chibiOS? or any tutorial?
Thanks a lot...............Iman
I see an example from ST by keil that show it can read ADC about 6.2MS, here is that:
https://www.dropbox.com/sh/e5qi2z4qht85 ... -S1Ka?dl=0
but I want to read ADC as fast as possible and 10MS is very good for my application so do you have any example for STM103 by chibiOS? or any tutorial?
Thanks a lot...............Iman
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: build a DAQ card by STM32F4 discovery
Hi,
It is STM32F303, not F103. there is an example of dual ADC under ./testhal.
The F4 would be able to do 6.2MS in triple ADC mode however this mode is not supported by the current ChibiOS driver, you would have to use the ST code.
Giovanni
It is STM32F303, not F103. there is an example of dual ADC under ./testhal.
The F4 would be able to do 6.2MS in triple ADC mode however this mode is not supported by the current ChibiOS driver, you would have to use the ST code.
Giovanni
Re: build a DAQ card by STM32F4 discovery
I'm very new to chibiOS, I want to read ADC and send converted value to PC by UART. In testhal example, converted ADC value store in which variable?
how can I buffer data to prevent getting memory full?
how can I buffer data to prevent getting memory full?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: build a DAQ card by STM32F4 discovery
The ADC driver is able of "continuous circular buffer" operations. An array is filled continuously in a circular mode, when the array is filled the conversion restarts from the beginning, callbacks are called at "half buffer" and "full buffer" in order to allow processing of data while the conversion is ongoing.
In the demo there is an example of this circular mode.
Giovanni
In the demo there is an example of this circular mode.
Giovanni
Re: build a DAQ card by STM32F4 discovery
Hello Giovanni
I have upgrade chibiOS source today, but STM32F3 discovery board stop working after uploading an example code on it, when press restart button! While it's working by previous version well.
Thanks a lot................Iman
I have upgrade chibiOS source today, but STM32F3 discovery board stop working after uploading an example code on it, when press restart button! While it's working by previous version well.
Thanks a lot................Iman
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: build a DAQ card by STM32F4 discovery
Hi,
The ADC code has changed, now it is required to specify ADC_CFGR_CONT in the CFGR field of the configuration structure manually. See the demo under testhal/STM32F3xx/ADC.
The change was required in order to make the driver functional with discontinuous mode.
Giovanni
The ADC code has changed, now it is required to specify ADC_CFGR_CONT in the CFGR field of the configuration structure manually. See the demo under testhal/STM32F3xx/ADC.
The change was required in order to make the driver functional with discontinuous mode.
Giovanni
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: build a DAQ card by STM32F4 discovery
There is something strange, the LED stops flashing after few seconds. I will look into this ASAP.
Only 3.0, 2.6.x works fine.
Giovanni
Only 3.0, 2.6.x works fine.
Giovanni
Who is online
Users browsing this forum: No registered users and 6 guests