L432 AnalogIn connected to GND reads 0.5 with GCC compiler and 0.0 with mbed

Bug #1811878 reported by Theunis van Niekerk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Expired
Undecided
Unassigned

Bug Description

Board: Nucleo L432
The following code was used with the mbed-os library:
#include "mbed.h"
DigitalOut o0(D0);
DigitalOut o1(D1);
DigitalOut o2(D2);
DigitalOut o3(D3);
DigitalOut o4(D4);
DigitalOut o5(D5);
DigitalOut o6(D6);
DigitalOut o7(D7);
DigitalOut o8(D8);
DigitalOut o9(D9);
DigitalOut o10(D10);
DigitalOut o11(D11);
DigitalOut o12(D12);
DigitalOut o13(D13);
//DigitalOut i0(A0);
DigitalOut i1(A1);
DigitalOut i2(A2);
DigitalOut i3(A3);
DigitalOut i4(A4);
DigitalOut i5(A5);
//DigitalOut i6(A6);
//DigitalOut i7(A7);
AnalogIn r_0(A0);

Serial pc(USBTX, USBRX);

int main()
{

 pc.baud(115200);
 while(1) {
  printf("Analog %3.2f%%\r\n", (r_0.read()*100.0f));
  wait_ms(500);
 }
}

Using the online mbed compiler the value reads 0.0 when grounded. With the GCC compiler the value reads around 0.45. If no other outputs are used the value will read 0.0. I tested this with the F746ZG board and there was no issues there.

Revision history for this message
Ramana Radhakrishnan (ramana) wrote :

Please provide a pre-processed testcase and the command line options, version used. This bug report is incomplete.

Changed in gcc-arm-embedded:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for GNU Arm Embedded Toolchain because there has been no activity for 60 days.]

Changed in gcc-arm-embedded:
status: Incomplete → Expired
Revision history for this message
stewo (wolfer-y) wrote : [Autoreply] [Bug 1811878] Re: L432 AnalogIn connected to GND reads 0.5 with GCC compiler and 0.0 with mbed

Ich bin bis 08.04. nicht im Haus und kann Ihre Nachricht daher leider nicht bearbeiten. In dringenden Fällen wenden Sie sich bitte an <email address hidden> bzw. für technische Fragen an <email address hidden>.

I am out of office until April 8th and won't be able to read your message. In urgent cases, please refer to <email address hidden> or for technical questions to <email address hidden>.

Mit freundlichen Grüßen / Best regards

Steffen Wolfer

--
Dipl.-Inform. Steffen Wolfer
Software Engineer Embedded Systems

WEISS ROBOTICS GmbH & Co. KG
Karl-Heinrich-Käferle-Str. 8
D-71640 Ludwigsburg, Germany

Phone: +49 7141 94702-22
Fax: +49 7141 94702-99
http://www.weiss-robotics.com

Sitz der Gesellschaft: Ludwigsburg
Registergericht Stuttgart, HRA725006

Pers. haftende Gesellschafterin:
Weiss Robotics Verwaltungs-GmbH, Sitz Ludwigsburg
Registergericht Stuttgart, HRB73310
Geschäftsführer: Dr. Karsten Weiß

[Expired for GNU Arm Embedded Toolchain because there has been no
activity for 60 days.]

** Changed in: gcc-arm-embedded
       Status: Incomplete => Expired

--
You received this bug notification because you are subscribed to GNU Arm
Embedded Toolchain.
Matching subscriptions: Älles
https://bugs.launchpad.net/bugs/1811878

Title:
  L432 AnalogIn connected to GND reads 0.5 with GCC compiler and 0.0
  with mbed

Status in GNU Arm Embedded Toolchain:
  Expired

Bug description:
  Board: Nucleo L432
  The following code was used with the mbed-os library:
  #include "mbed.h"
  DigitalOut o0(D0);
  DigitalOut o1(D1);
  DigitalOut o2(D2);
  DigitalOut o3(D3);
  DigitalOut o4(D4);
  DigitalOut o5(D5);
  DigitalOut o6(D6);
  DigitalOut o7(D7);
  DigitalOut o8(D8);
  DigitalOut o9(D9);
  DigitalOut o10(D10);
  DigitalOut o11(D11);
  DigitalOut o12(D12);
  DigitalOut o13(D13);
  //DigitalOut i0(A0);
  DigitalOut i1(A1);
  DigitalOut i2(A2);
  DigitalOut i3(A3);
  DigitalOut i4(A4);
  DigitalOut i5(A5);
  //DigitalOut i6(A6);
  //DigitalOut i7(A7);
  AnalogIn r_0(A0);

  Serial pc(USBTX, USBRX);

  int main()
  {

   pc.baud(115200);
   while(1) {
    printf("Analog %3.2f%%\r\n", (r_0.read()*100.0f));
    wait_ms(500);
   }
  }

  Using the online mbed compiler the value reads 0.0 when grounded. With the GCC compiler the value reads around 0.45. If no other outputs are used the value will read 0.0. I tested this with the F746ZG board and there was no issues there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc-arm-embedded/+bug/1811878/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.