Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnalogOut does not work for K64F #3999

Closed
mray190 opened this issue Mar 22, 2017 · 8 comments
Closed

AnalogOut does not work for K64F #3999

mray190 opened this issue Mar 22, 2017 · 8 comments

Comments

@mray190
Copy link
Contributor

mray190 commented Mar 22, 2017

Description

  • Type: Bug
  • Priority: Blocker

AnalogOut does not work for the K64F from mbed-os version 5.2.3 to 5.4.1.
mbed-os version 5.2.2 has a working AnalogOut api.

AnalogOut constructor works, and no errors occur during runtime. But regardless of what value gets set to the AnalogOut pin, the value floats at 0.03V.


Example code

#include "mbed.h"

int main() {
    AnalogOut aout(DAC0_OUT);
    aout = 0;
    wait_ms(200);
    aout = 1.0f;
    wait_ms(200);
    aout = 0.0f;
}

Image below shows no output waveform:
image


Bug

Target
K64F

Toolchain:
GCC_ARM

Toolchain version:
gcc version 5.4.1 20160919 (release) [ARM/embedded-5-branch revision 240496]

mbed-cli version:
1.0.0

meed-os sha:
cc58a7f

@mray190
Copy link
Contributor Author

mray190 commented Mar 22, 2017

@BlackstoneEngineering @senthilr

@sg-
@MarceloSalazar Why didn't OOB catch this? Do we not have any OOB tests that utilize analog out?
@screamerbg We should incorporate the CI test shield into our OOB testing. The CI test shield discovered this bug.

@MarceloSalazar
Copy link

We don't have example apps in OOB to catch these issues.
IMO, testing the CI shield is not something that we should be doing as part of OOB (it's not in the scope and goals of OOB).
The CI shield could be added to the the CI automated testing infrastructure.

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 23, 2017

The CI shield could be added to the the CI automated testing infrastructure.

+1

cc @mmahadevan108

@mmahadevan108
Copy link
Contributor

@0xc0170 Is this a bug related to the NXP port? Description states this was working before.

@mray190
Copy link
Contributor Author

mray190 commented Mar 30, 2017

@mmahadevan108 I believe so.
Other platforms do not have this issue

@BlackstoneEngineering
Copy link
Contributor

@MarceloSalazar In the medium to long term we should have the shield on the CI Infrstructure. In the short term we should do this as part of OOB on the relevant platforms as we do not yet have it integrated onto the CI farm.

@deepikabhavnani
Copy link

@mmahadevan108 - DAC output is not enabled in source code. If I un-comment the below line in DAC_Init() function, DAC works properly.

/* DAC_Enable(base, true); */ /* Tip: The DAC output can be enabled till then after user sets their own available data in application. */

Since the comment says it should be enabled when data is set, can you please fix it at write place and enable DAC.

@mmahadevan108
Copy link
Contributor

@deepikabhavnani Thank you. I have submitted a PR to fix this issue.

mmahadevan108 added a commit to nxp-archive/nxpmicro_mbed that referenced this issue Aug 10, 2017
adbridge pushed a commit that referenced this issue Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants