Analog Input #15 Disappeared From gpio/in/analog


#1

I observed this issue on Ubuntu 14.04, Axoloti Patcher 1.0.10-15-geb6308, developer build date: 19/05/2016 22:15:34 EDT.

In Preferences, Library, first search path entry is default, Name "factory", Location: "https://github.com/axoloti/axoloti-factory.git" Library is enabled.

I went to hook up my 16th analog input today and couldn't find PC5, ADC1_IN15. After inspecting the source for gpio/in/analog, the reason is clear, the entry is missing from the XML fields for the MenuEntries and CEntries for the object:
[...]
PC2 (ADC1_IN12)
PC3 (ADC1_IN13)
PC4 (ADC1_IN14)

[...]
11
12
13
14

[...]
The source code seems to be the same, missing the entry for Analog Input #15, in branches 1.0.6 - 1.0.10 and current master:

I'm hoping there's no preventative reason this input can't be used?! Anyways, I'm going to try to hand-edit and see if it works :slight_smile: Hurray for user-editable source code!

btw i fooking lurf this program.


#2

PC5 is not an analog GPIO, it's only digital


#3

The short answer: it is reserved for voltage monitoring, reducing the number of available analog inputs from 16 to 15.

The long answer: by modifying firmware, it looks like it is possible to scan all 16 channels for GPIO use, and configure an injected channel conversion for VREFINT. Documentation can be found in the DM00031020.pdf, section 13.3.9 Injected channel management, Auto-injection. I currently do not have time to implement this, but if you do, I'd welcome a pull request...


Official pin out/ports documentation