<?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>S32KのトピックRe: Trouble with ISELED digLED_Ping() command</title>
    <link>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/992896#M5846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Johnathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you reuse the callback as in the example:&lt;/P&gt;&lt;P&gt;void digLED_Callback(digLED_CommEventType state, uint8_t stripNr)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stateFlag = state;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stripCallback = stripNr;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;appState = BUS_FREE;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;you can set the appState variable to "OPERATION_ONGOING" before calling any ISELED function, and then wait for the callback to change it back to "BUS_FREE", instead of using a simple delay:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;digLED_ReturnType retCode;&lt;BR /&gt; &lt;BR /&gt; appState = OPERATION_ONGOING;&lt;BR /&gt; retCode = digLED_Ping(&amp;amp;digLEDResultStrip1, strip);&lt;BR /&gt; while(appState == OPERATION_ONGOING);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should assure that the command has enough time to execute as the callback is called when the transfer is complete.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also use the "retCode" variable to check the return value of the function. It should return "DIGLED_OK" if everything is in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that in order for this function to work, the LEDs need to be initialized first, so digLED_Init_Strip should be called before any other API function. If you try to call digLED_Ping before calling digLED_Init_Strip, the function will return "DIGLED_ERROR".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dragos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Nov 2019 13:43:40 GMT</pubDate>
    <dc:creator>dragosrachitan</dc:creator>
    <dc:date>2019-11-21T13:43:40Z</dc:date>
    <item>
      <title>Trouble with ISELED digLED_Ping() command</title>
      <link>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/992895#M5845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the ping command with a strip of ISELED LEDs in order to have a dynamic strip length demonstrator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to access the value for the number of LEDs currently connected in the strip by using the following commands based on the iseled_freemaster example program:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;digLED_Ping(&amp;amp;digLEDResultStrip1, strip);&lt;/P&gt;&lt;P&gt;delay(9000);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint16_t pingVal = &lt;SPAN style="font-size: 10.0pt;"&gt;digLEDResultBufferStrip1[0];&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;//Buffer[0] is the first response that reaches the MCU. For ping, only one response is transmitted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;pingVal &lt;SPAN style="font-size: 10.0pt;"&gt;&amp;amp;=0xFFF000;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;// the result buffer contains 24 bit. 12 bit for address (MSB) and 12 bit data (LSB). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;When I check the value of pingVal while using the debugger however, I only ever see the value '0' regardless of how many LEDs are connected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt;"&gt;Has anyone else had success using this command, and how did you get it to work?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2019 13:59:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/992895#M5845</guid>
      <dc:creator>johnathan_weise</dc:creator>
      <dc:date>2019-11-14T13:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with ISELED digLED_Ping() command</title>
      <link>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/992896#M5846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Johnathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you reuse the callback as in the example:&lt;/P&gt;&lt;P&gt;void digLED_Callback(digLED_CommEventType state, uint8_t stripNr)&lt;BR /&gt;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stateFlag = state;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;stripCallback = stripNr;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;appState = BUS_FREE;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;you can set the appState variable to "OPERATION_ONGOING" before calling any ISELED function, and then wait for the callback to change it back to "BUS_FREE", instead of using a simple delay:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;digLED_ReturnType retCode;&lt;BR /&gt; &lt;BR /&gt; appState = OPERATION_ONGOING;&lt;BR /&gt; retCode = digLED_Ping(&amp;amp;digLEDResultStrip1, strip);&lt;BR /&gt; while(appState == OPERATION_ONGOING);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should assure that the command has enough time to execute as the callback is called when the transfer is complete.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also use the "retCode" variable to check the return value of the function. It should return "DIGLED_OK" if everything is in order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please note that in order for this function to work, the LEDs need to be initialized first, so digLED_Init_Strip should be called before any other API function. If you try to call digLED_Ping before calling digLED_Init_Strip, the function will return "DIGLED_ERROR".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Dragos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2019 13:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/992896#M5846</guid>
      <dc:creator>dragosrachitan</dc:creator>
      <dc:date>2019-11-21T13:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with ISELED digLED_Ping() command</title>
      <link>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/1229267#M9861</link>
      <description>&lt;P&gt;Hello Dragos,&lt;/P&gt;&lt;P&gt;I'm trying to get an answer from the ping function.&lt;/P&gt;&lt;P&gt;The following code shows the ISELED initialization.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iseledFctReturnValues[0] = digLED_Init_Interface(NUMBER_OF_INTERFACES, iseled1_InitConfig);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;appState = OPERATION_ONGOING;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;iseledFctReturnValues[1] = digLED_Reset(strip);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while (appState != BUS_FREE)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// wait&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// initialize LED-stripe&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;appState = OPERATION_ONGOING;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;digLEDResultStrip1.chainLength = MAX_NUM_LEDS;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;digLEDResultStrip1.retData = &amp;amp;isledReturn.digLEDResultBufferStrip1[0];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;iseledFctReturnValues[2] = digLED_Init_Strip(&amp;amp;testInitType, &amp;amp;digLEDResultStrip1, strip);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while (appState != BUS_FREE)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// wait&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;// Turn all LEDs off&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;appState = OPERATION_ONGOING;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;iseledFctReturnValues[3] = digLED_Set_RGB(0, 0, 0, 0, strip);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while (appState != BUS_FREE)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// wait&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;appState = OPERATION_ONGOING;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;digLEDResultStrip1.chainLength = MAX_NUM_LEDS;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;digLEDResultStrip1.retData = &amp;amp;idigLEDResultBufferStrip1[0];&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;iseledFctReturnValues[4] = digLED_Ping(&amp;amp;digLEDResultStrip1, strip);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;while (appState != BUS_FREE)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;// wait&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Each digLED function returns DIGLED_OK, but &lt;EM&gt;digLED_Ping&lt;/EM&gt; contains only zero, but actually there are 200 LEDs connected. These LEDs can be turned on without any problem.&lt;/P&gt;&lt;P&gt;The Callback is implemented as you mentioned.&lt;/P&gt;&lt;P&gt;Is there a Pin configuration necessary to make the Ping function work?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2021 11:30:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Trouble-with-ISELED-digLED-Ping-command/m-p/1229267#M9861</guid>
      <dc:creator>6T9</dc:creator>
      <dc:date>2021-02-10T11:30:31Z</dc:date>
    </item>
  </channel>
</rss>

