LED code example does not work

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

LED code example does not work

191 Views
deshmaneaakash
Contributor I

I was following this example on my s32k116: https://www.nxp.com/design/design-center/training/TIP-GET-TO-KNOW-THE-USER-FRIENDLY-MBDT-D0609

I did exactly what was shown in the video to get the LED working. My code builds too. But the LED wont turn on when I turn the potentiometer. I have attached a picture of the board for reference.
Kindly guide me on where I might be going wrong

WhatsApp Image 2026-01-19 at 5.18.32 PM.jpeg

0 Kudos
Reply
1 Reply

97 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

Please note that the video you mentioned uses another evaluation kit (S32K144EVB) and the pins might not be the same for S32K116. Did you check the schematic to see the pins used by the potentiometer and the LED?

As a recommendation, try to use the FreeMASTER tool to visualize the data on the board. You have to add data store memory blocks to save the data from the ADC and the state of the LED. Please set them to Volatile (in order to see them in FreeMASTER). 

Another variant is to use the S32 Design Studio to directly debug the application, by placing breakpoints at specific lines and see the values read from the potentiometer.

Best regards,

Sorin Bancila 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2296212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELED%20code%20example%20does%20not%20work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20was%20following%20this%20example%20on%20my%20s32k116%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Ftraining%2FTIP-GET-TO-KNOW-THE-USER-FRIENDLY-MBDT-D0609%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Ftraining%2FTIP-GET-TO-KNOW-THE-USER-FRIENDLY-MBDT-D0609%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EI%20did%20exactly%20what%20was%20shown%20in%20the%20video%20to%20get%20the%20LED%20working.%20My%20code%20builds%20too.%20But%20the%20LED%20wont%20turn%20on%20when%20I%20turn%20the%20potentiometer.%20I%20have%20attached%20a%20picture%20of%20the%20board%20for%20reference.%3CBR%20%2F%3EKindly%20guide%20me%20on%20where%20I%20might%20be%20going%20wrong%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22WhatsApp%20Image%202026-01-19%20at%205.18.32%20PM.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22WhatsApp%20Image%202026-01-19%20at%205.18.32%20PM.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22WhatsApp%20Image%202026-01-19%20at%205.18.32%20PM.jpeg%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373398i3A16192ECF307DF8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22WhatsApp%20Image%202026-01-19%20at%205.18.32%20PM.jpeg%22%20alt%3D%22WhatsApp%20Image%202026-01-19%20at%205.18.32%20PM.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2298212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LED%20code%20example%20does%20not%20work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2298212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CP%3EPlease%20note%20that%20the%20video%20you%20mentioned%20uses%20another%20evaluation%20kit%20(S32K144EVB)%20and%20the%20pins%20might%20not%20be%20the%20same%20for%20S32K116.%20Did%20you%20check%20the%20schematic%20to%20see%20the%20pins%20used%20by%20the%20potentiometer%20and%20the%20LED%3F%3C%2FP%3E%0A%3CP%3EAs%20a%20recommendation%2C%20try%20to%20use%20the%20FreeMASTER%20tool%20to%20visualize%20the%20data%20on%20the%20board.%20You%20have%20to%20add%20data%20store%20memory%20blocks%20to%20save%20the%20data%20from%20the%20ADC%20and%20the%20state%20of%20the%20LED.%20Please%20set%20them%20to%26nbsp%3B%3CSTRONG%3EVolatile%3C%2FSTRONG%3E%20(in%20order%20to%20see%20them%20in%20FreeMASTER).%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20variant%20is%20to%20use%20the%20S32%20Design%20Studio%20to%20directly%20debug%20the%20application%2C%20by%20placing%20breakpoints%20at%20specific%20lines%20and%20see%20the%20values%20read%20from%20the%20potentiometer.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ESorin%20Bancila%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E