Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi,
Setting the digital pins as a BusOut Causes and issue with analogIn PA_6
#include "mbed.h" Serial pc(USBTX,USBRX,115200); BusOut muxBus(PB_0, PB_7, PB_6, PB_1, PF_0, PF_1); AnalogIn ADC[] = {PA_0, PA_1, PA_3, PA_4, PA_5, PA_6}; DigitalOut myled(LED1); int main() { printf("\r\n"); while(1) { myled = 1; // LED is ON wait(0.2); // 200 ms myled = 0; // LED is OFF wait(1.0); // 1 sec for(int i = 0; i<=5; i++){ printf("A%i: %f \t", i,ADC[i].read()*3.3); } printf("\r\n"); } }Gives the following output
Quote:
A0: 2.788279 A1: 1.838169 A2: 2.394213 A3: 1.725348 A4: 0.004029 A5: 0.014505
If I remove PB_6 from the BusOut it seems to fix the issue at least for analogIn(PA_6).