<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ADC Channel Change Locks into DevAssert Loop in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074426#M6471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The debugger unexpectedly stops at the following when I change ADC channel from 11U to any other channel (I've tried 5 or 6).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the adc_hwtrigger_s32k144 example.&amp;nbsp; It was originally working at channel 12 out of the box and I made some changes to the ADC and moved to channel 11 and everything was working great.&amp;nbsp; I was printing the ADC output to the console correctly by changing the print() calls to printf().&amp;nbsp; When I changed from channel 11 to channel 10, I got the following screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/110889i071E0A64924110D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clicking resume doesn't move past it, I'm stuck in this for loop.&amp;nbsp; Never prints ADC to console.&amp;nbsp; I changed printf() back to print() but no luck.&amp;nbsp; Only thing that gets it working again is changing the channel back to 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played with the ADC settings in processor expert but reverted back and no change.&amp;nbsp; Very strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;I attempted to start with a fresh version of the example to make sure I didn't cause the problem by messing with ADC parameters and got a similar result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Aug 2020 17:17:02 GMT</pubDate>
    <dc:creator>sparkee</dc:creator>
    <dc:date>2020-08-27T17:17:02Z</dc:date>
    <item>
      <title>ADC Channel Change Locks into DevAssert Loop</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074426#M6471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The debugger unexpectedly stops at the following when I change ADC channel from 11U to any other channel (I've tried 5 or 6).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the adc_hwtrigger_s32k144 example.&amp;nbsp; It was originally working at channel 12 out of the box and I made some changes to the ADC and moved to channel 11 and everything was working great.&amp;nbsp; I was printing the ADC output to the console correctly by changing the print() calls to printf().&amp;nbsp; When I changed from channel 11 to channel 10, I got the following screen:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/110889i071E0A64924110D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clicking resume doesn't move past it, I'm stuck in this for loop.&amp;nbsp; Never prints ADC to console.&amp;nbsp; I changed printf() back to print() but no luck.&amp;nbsp; Only thing that gets it working again is changing the channel back to 11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I played with the ADC settings in processor expert but reverted back and no change.&amp;nbsp; Very strange.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UPDATE:&lt;/P&gt;&lt;P&gt;I attempted to start with a fresh version of the example to make sure I didn't cause the problem by messing with ADC parameters and got a similar result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2020 17:17:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074426#M6471</guid>
      <dc:creator>sparkee</dc:creator>
      <dc:date>2020-08-27T17:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Channel Change Locks into DevAssert Loop</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074427#M6472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;seems it is stopping at below line in main.c&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEV_ASSERT(adConv0_ChnConfig0.channel == ADC_CHN);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So do you have channel selected in ADC component same as ADC_CHN defined in main.c?&lt;/P&gt;&lt;P&gt;Did you generate PE code after changed done in PE?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR, Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 07:21:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074427#M6472</guid>
      <dc:creator>PetrS</dc:creator>
      <dc:date>2020-08-28T07:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: ADC Channel Change Locks into DevAssert Loop</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074428#M6473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started fresh with the example and generated PE code as soon as the example loaded.&lt;SPAN style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;The only change I made was to the line in main.c that defined the ADC_CHN.&amp;nbsp; I did not think I needed to generate code again.&amp;nbsp; I did make changes and generate code after the problem started happening though so I don't believe that is the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;#define ADC_CHN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12U&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#####UPDATE######&lt;/P&gt;&lt;P&gt;I figured out the problem after thinking about what you said and figuring out what the DevAssert function was doing.&amp;nbsp; The PE has assigned a channel to the ADC and I'm changing it in the code but DevAssert() is checking that it's still the same as what PE assigned it.&amp;nbsp; Since I changed it, it hangs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This leads to my question from a few days ago about the &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-335643"&gt;Blink LED example&amp;nbsp;&lt;/A&gt;where I ask about redundancy of doing things in main.c that the PE has already done.&amp;nbsp; In that example, DevAssert() isn't being used so it doesn't matter but I think it's terrible practice to assign variables a value in multiple places.&amp;nbsp; Even if it doesn't cause compile problems, it makes it hard to debug later.&amp;nbsp; It's also very confusing to me to look through the examples and see things like that. It made me thing the PE wasn't doing what I thought it should be doing.&amp;nbsp; It would be better to put that code in as a comment that notes what you would do if PE hadn't already done the work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/PetrS"&gt;PetrS&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Aug 2020 13:59:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/ADC-Channel-Change-Locks-into-DevAssert-Loop/m-p/1074428#M6473</guid>
      <dc:creator>sparkee</dc:creator>
      <dc:date>2020-08-28T13:59:00Z</dc:date>
    </item>
  </channel>
</rss>

