<?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 LPOFF_Auto_WU Driver Bug Fix in Power Management</title>
    <link>https://community.nxp.com/t5/Power-Management/LPOFF-Auto-WU-Driver-Bug-Fix/m-p/1163876#M1189</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on FS6500 SBC, I noticed an error when i try LPOFF_Auto_WU.&lt;/P&gt;&lt;P&gt;When I want to set the LPOFF_AUTO_WU bit ( call&amp;nbsp;FS65_SetLowPowerMode(true) ), the GO_LPOFF bit is also set. It doesn't sleep, doesn't reset.&lt;/P&gt;&lt;P&gt;I changed line 14.&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK) | FS65_W_M_GO_LPOFF_LPOFF;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK); // | FS65_W_M_GO_LPOFF_LPOFF;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fixed&amp;nbsp;FS65_SetLowPowerMode function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;fs65_status_t FS65_SetLowPowerMode(bool autoWU)
{
    fs65_status_t status;       /* Status variable. */
    fs65_rx_data_t response;    /* Response to the command. */
    uint8_t  writeData;         /* Data to be updated. */

    /* Read VKAM control state to preserve it. */
    status = FS65_ReadRegister(FS65_M_MODE_ADDR, &amp;amp;response);
    if (status != fs65StatusOk)
    {
        return status;
    }

    /* Set previously read VKAM value to write data. */
    writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK); //| FS65_W_M_GO_LPOFF_LPOFF;

    /* Set LPOFF mode. */
    writeData |= autoWU ? FS65_W_M_LPOFF_AUTO_WU_LPOFF : FS65_W_M_GO_LPOFF_LPOFF;

    return FS65_WriteRegister(FS65_M_MODE_ADDR, writeData, NULL);

    /* Write check is not performed because of entering LPOFF mode. */
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Oct 2020 11:56:18 GMT</pubDate>
    <dc:creator>sonerbayram</dc:creator>
    <dc:date>2020-10-07T11:56:18Z</dc:date>
    <item>
      <title>LPOFF_Auto_WU Driver Bug Fix</title>
      <link>https://community.nxp.com/t5/Power-Management/LPOFF-Auto-WU-Driver-Bug-Fix/m-p/1163876#M1189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on FS6500 SBC, I noticed an error when i try LPOFF_Auto_WU.&lt;/P&gt;&lt;P&gt;When I want to set the LPOFF_AUTO_WU bit ( call&amp;nbsp;FS65_SetLowPowerMode(true) ), the GO_LPOFF bit is also set. It doesn't sleep, doesn't reset.&lt;/P&gt;&lt;P&gt;I changed line 14.&lt;/P&gt;&lt;P&gt;from&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK) | FS65_W_M_GO_LPOFF_LPOFF;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK); // | FS65_W_M_GO_LPOFF_LPOFF;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Fixed&amp;nbsp;FS65_SetLowPowerMode function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;fs65_status_t FS65_SetLowPowerMode(bool autoWU)
{
    fs65_status_t status;       /* Status variable. */
    fs65_rx_data_t response;    /* Response to the command. */
    uint8_t  writeData;         /* Data to be updated. */

    /* Read VKAM control state to preserve it. */
    status = FS65_ReadRegister(FS65_M_MODE_ADDR, &amp;amp;response);
    if (status != fs65StatusOk)
    {
        return status;
    }

    /* Set previously read VKAM value to write data. */
    writeData = (response.readData &amp;amp; FS65_RW_M_VKAM_EN_MASK); //| FS65_W_M_GO_LPOFF_LPOFF;

    /* Set LPOFF mode. */
    writeData |= autoWU ? FS65_W_M_LPOFF_AUTO_WU_LPOFF : FS65_W_M_GO_LPOFF_LPOFF;

    return FS65_WriteRegister(FS65_M_MODE_ADDR, writeData, NULL);

    /* Write check is not performed because of entering LPOFF mode. */
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Oct 2020 11:56:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Power-Management/LPOFF-Auto-WU-Driver-Bug-Fix/m-p/1163876#M1189</guid>
      <dc:creator>sonerbayram</dc:creator>
      <dc:date>2020-10-07T11:56:18Z</dc:date>
    </item>
  </channel>
</rss>

