FRDM-MCXN947 LED works only on unexpected pin

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FRDM-MCXN947 LED works only on unexpected pin

1,221 Views
lahSSen21
Contributor I

Hello, I am a student first time using the FRDM-MCXN947 board with MCUXpresso IDE. During our practical lab session we tried to implement the basic external LED blinking , but we encountered some strange behavior.

  • We configured the pin using the Pins Tool in MCUXpresso.

  • We used the port and pin mapping provided by our teacher and verified it with the official documentation.

  • The code compiled and flashed correctly.

However, the LED did not blink on the expected GPIO pin. After testing different connections, the LED only worked when we connected it to a nearby pin rather than the one defined in the code. We confirmed this by modifying the delay in the code, and the blinking speed changed accordingly, so the program was definitely running.

Another unusual observation is that the LED only worked  when the polarity was reversed (LED positive connected to GND and negative connected to the GPIO pin).

Most student groups in our class had similar problems, and we are not sure whether the issue is related to:

  • incorrect pin mapping between the MCU and the board headers

  • internal pull-ups or active-low configurations

  • or a hardware wiring misunderstanding

Could someone clarify the correct way to wire an external LED and push button on the FRDM-MCXN947 board and confirm the correct pin mapping for simple GPIO examples?

Thank you.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

1,162 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @lahSSen21 

  • The LED may not be connected to the GPIO pin configured in your code.
    Please refer to the FRDM‑MCXN947 schematic to verify the correct mapping between the MCU pin and the board header.
  • Regarding the LED only lighting when connected in reverse polarity:
    Please also check the schematic to confirm which side of the circuit is driven high or low on that specific pin.

  • There is a “blinky” demo available in the MCXN947 SDK.
    Please refer to that example to confirm the correct GPIO configuration for controlling an LED.

 

Thank you.

BR

Alice

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2329260%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EFRDM-MCXN947%20LED%20works%20only%20on%20unexpected%20pin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2329260%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHello%2C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EI%20am%20a%20student%20first%20time%20using%20the%20FRDM-MCXN947%20board%20with%20MCUXpresso%20IDE.%20During%20our%20practical%20lab%20session%20we%20tried%20to%20implement%20the%20basic%20external%20LED%20blinking%20%2C%20but%20we%20encountered%20some%20strange%20behavior.%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EWe%20configured%20the%20pin%20using%20the%20Pins%20Tool%20in%20MCUXpresso.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EWe%20used%20the%20port%20and%20pin%20mapping%20provided%20by%20our%20teacher%20and%20verified%20it%20with%20the%20official%20documentation.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EThe%20code%20compiled%20and%20flashed%20correctly.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EHowever%2C%20the%20LED%20did%20not%20blink%20on%20the%20expected%20GPIO%20pin.%20After%20testing%20different%20connections%2C%20the%20LED%20only%20worked%20when%20we%20connected%20it%20to%20a%20nearby%20pin%20rather%20than%20the%20one%20defined%20in%20the%20code.%20We%20confirmed%20this%20by%20modifying%20the%20delay%20in%20the%20code%2C%20and%20the%20blinking%20speed%20changed%20accordingly%2C%20so%20the%20program%20was%20definitely%20running.%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EAnother%20unusual%20observation%20is%20that%20the%20LED%20only%20worked%26nbsp%3B%20when%20the%20polarity%20was%20reversed%20(LED%20positive%20connected%20to%20GND%20and%20negative%20connected%20to%20the%20GPIO%20pin).%3C%2FSPAN%3E%3C%2FP%3E%3CP%20class%3D%22%22%3E%3CSPAN%3EMost%20student%20groups%20in%20our%20class%20had%20similar%20problems%2C%20and%20we%20are%20not%20sure%20whether%20the%20issue%20is%20related%20to%3A%3C%2FSPAN%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3Eincorrect%20pin%20mapping%20between%20the%20MCU%20and%20the%20board%20headers%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3Einternal%20pull-ups%20or%20active-low%20configurations%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%20class%3D%22%22%3E%3CSPAN%3Eor%20a%20hardware%20wiring%20misunderstanding%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%20class%3D%22%22%3E%3CSPAN%3ECould%20someone%20clarify%20the%20correct%20way%20to%20wire%20an%20external%20LED%20and%20push%20button%20on%20the%20FRDM-MCXN947%20board%20and%20confirm%20the%20correct%20pin%20mapping%20for%20simple%20GPIO%20examples%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2329260%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2329728%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20FRDM-MCXN947%20LED%20works%20only%20on%20unexpected%20pin%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2329728%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F260549%22%20target%3D%22_blank%22%3E%40lahSSen21%3C%2FA%3E%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CDIV%3E%0A%3CUL%3E%0A%3CLI%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EThe%20LED%20may%20not%20be%20connected%20to%20the%20GPIO%20pin%20configured%20in%20your%20code.%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EPlease%20refer%20to%20the%20FRDM%E2%80%91MCXN947%20schematic%20to%20verify%20the%20correct%20mapping%20between%20the%20MCU%20pin%20and%20the%20board%20header.%3C%2FFONT%3E%3C%2FLI%3E%0A%3CLI%3E%0A%3CP%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3ERegarding%20the%20LED%20only%20lighting%20when%20connected%20in%20reverse%20polarity%3A%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EPlease%20also%20check%20the%20schematic%20to%20confirm%20which%20side%20of%20the%20circuit%20is%20driven%20high%20or%20low%20on%20that%20specific%20pin.%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%0A%3CP%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EThere%20is%20a%20%E2%80%9Cblinky%E2%80%9D%20demo%20available%20in%20the%20MCXN947%20SDK.%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20face%3D%22times%20new%20roman%2Ctimes%22%20size%3D%224%22%3EPlease%20refer%20to%20that%20example%20to%20confirm%20the%20correct%20GPIO%20configuration%20for%20controlling%20an%20LED.%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3EThank%20you.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EAlice%3C%2FP%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E