ADC speed for Olimexino-GD32 vs. RedPill

Boards based on the GigaDevices GD32F103 microcontroller
User avatar
ahull
Posts: 1397
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby ahull » Wed Oct 12, 2016 12:55 am

The Pig-o-scope thread also has some ideas about this topic.
http://www.stm32duino.com/viewtopic.php ... &start=230
- Andy Hull -

EventHorizon
Posts: 6
Joined: Thu Oct 06, 2016 6:52 pm

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby EventHorizon » Wed Oct 12, 2016 2:00 am

Quick update: I've managed to get my Olimexino-GD32s up and running again reflashing the bootloader via serial using ST Flash Loader Demonstrator. The bootloader is for STM32: prodTest_OLIMEXINO_STM32.hex.

So playing again with the ADC (12-bit):
Again, Maple IDE: 909 ns per conversion (1.1 Msps).
New, Arduino IDE (Maple 3 board): 833 ns per conversion (1.2 Msps).

I'm impressed for a $9 board.

User avatar
ahull
Posts: 1397
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby ahull » Wed Oct 12, 2016 8:03 am

EventHorizon wrote:Quick update: I've managed to get my Olimexino-GD32s up and running again reflashing the bootloader via serial using ST Flash Loader Demonstrator. The bootloader is for STM32: prodTest_OLIMEXINO_STM32.hex.

So playing again with the ADC (12-bit):
Again, Maple IDE: 909 ns per conversion (1.1 Msps).
New, Arduino IDE (Maple 3 board): 833 ns per conversion (1.2 Msps).

I'm impressed for a $9 board.


Is that per channel, or using two channels interleaved?
- Andy Hull -

User avatar
Pito
Posts: 609
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby Pito » Wed Oct 12, 2016 8:32 am

What is the quality of the conversion at that speeds?

EventHorizon
Posts: 6
Joined: Thu Oct 06, 2016 6:52 pm

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby EventHorizon » Wed Oct 12, 2016 2:08 pm

ahull wrote: Is that per channel, or using two channels interleaved?


Per channel, using just a simple sketch with analog.read(analogPin).

EventHorizon
Posts: 6
Joined: Thu Oct 06, 2016 6:52 pm

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby EventHorizon » Wed Oct 12, 2016 2:14 pm

Pito wrote:What is the quality of the conversion at that speeds?


I was using the cheapest pot I could find connected with 4" wires to the board's 3.3V. At near full scale (around 4000 at the output) the standard deviation was 1.7.

User avatar
ahull
Posts: 1397
Joined: Mon Apr 27, 2015 11:04 pm
Location: Sunny Scotland
Contact:

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby ahull » Wed Oct 12, 2016 2:35 pm

Its a 12 bit adc, (max count 4096), so a rough guestimate is 2 counts in 4000 is probably +/- the LSB or maybe a little bit worse. I would imagine that the lack of a separate analog ground will also have an impact of a few parts per thousand on the accuracy too.

This gives various hints for improving things, but I would suggest that driving the ADC even faster (but reducing accuracy to say 8 bits) would be worth investigating. I suspect if we could clock it fast enough we might even get 4 mega samples per second or more, trading accuracy for speed of course. I wonder what is the maximum speed we can clock the ADC at (not the maximum stated by the datasheet, but the maximum we can actually overclock to), and how fast can we actually read and reset the ADC, without bothering to let it settle.

Now if 12 bits is three nibbles, that makes it a tribble... I wonder how much trouble we can get in to from messing with these tribbles. :P
- Andy Hull -

User avatar
Pito
Posts: 609
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: ADC speed for Olimexino-GD32 vs. RedPill

Postby Pito » Wed Oct 12, 2016 3:52 pm

The STM's doc on ADC does not mention ENOB at all..


Return to “GD32F103 boards”

Who is online

Users browsing this forum: No registered users and 1 guest