Skip to main content
bluewaters213
Associate III
June 20, 2013
Question

Do Peripherals on ADC Pins Need Remap for ADC to work?

  • June 20, 2013
  • 3 replies
  • 596 views
Posted on June 20, 2013 at 02:17

The original post was too long to process during our migration. Please click on the attachment to read the original post.
    This topic has been closed for replies.

    3 replies

    raptorhal2
    Lead
    June 20, 2013
    Posted on June 20, 2013 at 16:53

    Remapping the ADC pins to AN mode should do it. But I won't wade through your register code to see if something else is wrong.

    Cheers, Hal

    jj2
    Associate
    June 20, 2013
    Posted on June 20, 2013 at 18:22

    Believe Hal makes very valid point, ''I won't wade through your register code to see if something else is wrong.''

    Might your post (and that of others) benefit by your reducing and confining the code presented to just the essence?  (as the code block extends - review effort increases - likelihood of response thus decreases...) 

    In your case - single ADC channel presentation would greatly shrink/simplify.  (you can easily then generalize single channel into multiple)

    Further - should standard, vendor API code be available - that is most always preferable to ''register code'' - which is not likely to be ''intuitive'' to code reviewers...

    Suggest that you employ vendor API code for single channel - note results.  Review of that code likely to reveal registers and logic ''in play'' - and then better enable your later success w/register code - if that is even necessary...

    Amel NASRI
    ST Technical Moderator
    June 20, 2013
    Posted on June 20, 2013 at 18:36

    Might your post (and that of others) benefit by your reducing and confining the code presented to just the essence? 

     

     

    Totally agree...

    Also I suggest to use ''Format code block'' feature for codes. This makes them easily readable.

    -Mayla-
    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.