請問CH592為什么關閉LSE之后,PA10(X32KI)與PA11(X32KO)輸出高電平仍然還是1.4V?
我的代碼如下:
代碼1:
//? ?R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG1;
?//? ?R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG2;
?//? ?R8_CK32K_CONFIG &= ~(RB_CLK_OSC32K_XT|RB_CLK_XT32K_PON);
?//? ?R8_CK32K_CONFIG |= RB_CLK_INT32K_PON;
?//? ?R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG0;
? ? sys_safe_access_enable();
? ? R8_CK32K_CONFIG &= ~(RB_CLK_OSC32K_XT | RB_CLK_XT32K_PON);
? ? sys_safe_access_disable();
? ? sys_safe_access_enable();
? ? R8_CK32K_CONFIG |= RB_CLK_INT32K_PON;
? ? sys_safe_access_disable();
? ? GPIOA_ModeCfg(GPIO_Pin_11, GPIO_ModeOut_PP_5mA);
? ? GPIOA_ModeCfg(GPIO_Pin_10, GPIO_ModeOut_PP_5mA);
這個代碼試了,不行!輸出還是1.4V。
換了代碼2,如下:
代碼2:
? ? R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG1;
? ? R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG2;
? ? R8_CK32K_CONFIG &= ~(RB_CLK_OSC32K_XT|RB_CLK_XT32K_PON);
? ? R8_CK32K_CONFIG |= RB_CLK_INT32K_PON;
? ? R8_SAFE_ACCESS_SIG = SAFE_ACCESS_SIG0;
?//? ?sys_safe_access_enable();
?//? ?R8_CK32K_CONFIG &= ~(RB_CLK_OSC32K_XT | RB_CLK_XT32K_PON);
?//? ?sys_safe_access_disable();
?//? ?sys_safe_access_enable();
?//? ?R8_CK32K_CONFIG |= RB_CLK_INT32K_PON;
?//? ?sys_safe_access_disable();
? ? GPIOA_ModeCfg(GPIO_Pin_11, GPIO_ModeOut_PP_5mA);
? ? GPIOA_ModeCfg(GPIO_Pin_10, GPIO_ModeOut_PP_5mA);
這個代碼試過,也是不行,輸出高電平為1.4V。
所以煩請貴司高手幫忙解答一下,是否這兩個口不能用作普通IO口?還是我哪個地方弄錯了?