LED code example does not work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LED code example does not work

190 次查看
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 项奖励
回复
1 回复

96 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2296212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELED%20%E4%BB%A3%E7%A0%81%E7%A4%BA%E4%BE%8B%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296212%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E5%9C%A8%E6%88%91%E7%9A%84%20s32k116%20%E4%B8%8A%E9%81%B5%E5%BE%AA%E4%BA%86%E8%BF%99%E4%B8%AA%E7%A4%BA%E4%BE%8B%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%3E%EF%BC%9A%20https%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%3E%E6%88%91%E5%AE%8C%E5%85%A8%E6%8C%89%E7%85%A7%E8%A7%86%E9%A2%91%E4%B8%AD%E7%9A%84%E6%96%B9%E6%B3%95%E8%AE%A9%20LED%20%E6%AD%A3%E5%B8%B8%E5%B7%A5%E4%BD%9C%E3%80%82%E6%88%91%E7%9A%84%E4%BB%A3%E7%A0%81%E4%B9%9F%E5%9C%A8%E6%9E%84%E5%BB%BA%E3%80%82%E4%BD%86%E5%BD%93%E6%88%91%E8%BD%AC%E5%8A%A8%E7%94%B5%E4%BD%8D%E5%99%A8%E6%97%B6%EF%BC%8CLED%20%E7%81%AF%E4%B8%8D%E4%BC%9A%E4%BA%AE%E3%80%82%E6%88%91%E9%99%84%E4%B8%8A%E4%BA%86%E4%B8%80%E5%BC%A0%E6%9D%BF%E7%9A%84%E7%85%A7%E7%89%87%E4%BB%A5%E4%BE%9B%E5%8F%82%E8%80%83%E3%80%82%3CBR%20%2F%3E%E8%AF%B7%E5%91%8A%E8%AF%89%E6%88%91%E5%93%AA%E9%87%8C%E5%87%BA%E4%BA%86%E9%97%AE%E9%A2%98%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%3E%E4%BD%A0%E5%A5%BD%3C%2FP%3E%0A%3CP%3E%E8%AF%B7%E6%B3%A8%E6%84%8F%EF%BC%8C%E6%82%A8%E6%8F%90%E5%88%B0%E7%9A%84%E8%A7%86%E9%A2%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%E5%8F%A6%E4%B8%80%E4%B8%AA%E8%AF%84%E4%BC%B0%E5%A5%97%E4%BB%B6%EF%BC%88S32K144EVB%EF%BC%89%EF%BC%8CS32K116%20%E7%9A%84%E5%BC%95%E8%84%9A%E5%8F%AF%E8%83%BD%E4%B8%8D%E4%B8%80%E6%A0%B7%E3%80%82%E6%82%A8%E6%98%AF%E5%90%A6%E6%9F%A5%E7%9C%8B%E4%BA%86%E5%8E%9F%E7%90%86%E5%9B%BE%EF%BC%8C%E4%BA%86%E8%A7%A3%E7%94%B5%E4%BD%8D%E5%99%A8%E5%92%8C%20LED%20%E6%89%80%E7%94%A8%E7%9A%84%E5%BC%95%E8%84%9A%EF%BC%9F%3C%2FP%3E%0A%3CP%3E%E4%BD%9C%E4%B8%BA%E5%BB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