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. */
}