2021-08-20 05:42 PM
When I switch HSI to LSE using IAR, there is always an error that "Failed to get execution status: SWIM error [30004]: Comm timeout"
There is switch function:
void HSI_TO_LSE(void)
{
if(CLK_SCSR!=0x08) // if LSE is not selected as the system clock source
CLK_SWCR_SWEN=1; // Enable clock switch
CLK_SWR=0x08; // Switch HSI to LSE
while(CLK_SWCR_SWBSY); // Wait until LSE ready
CLK_SWCR=0x00;
}