LPOFF_Auto_WU Driver Bug Fix

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPOFF_Auto_WU Driver Bug Fix

1,289件の閲覧回数
sonerbayram
Contributor I

Hi,

I am working on FS6500 SBC, I noticed an error when i try LPOFF_Auto_WU.

When I want to set the LPOFF_AUTO_WU bit ( call FS65_SetLowPowerMode(true) ), the GO_LPOFF bit is also set. It doesn't sleep, doesn't reset.

I changed line 14.

from

 

writeData = (response.readData & FS65_RW_M_VKAM_EN_MASK) | FS65_W_M_GO_LPOFF_LPOFF;

 

to

 

writeData = (response.readData & FS65_RW_M_VKAM_EN_MASK); // | FS65_W_M_GO_LPOFF_LPOFF;

 

Fixed FS65_SetLowPowerMode function.

 

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, &response);
    if (status != fs65StatusOk)
    {
        return status;
    }

    /* Set previously read VKAM value to write data. */
    writeData = (response.readData & 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. */
}

 

ラベル(2)
0 件の賞賛
返信
0 返答(返信)