AnsweredAssumed Answered

HI, The mcu(MKE04Z8VWJ4) is used. The clk pin of SWD can not changed to IO,The dio pin of SWD can changed to IO .

Question asked by 建雄 李 on Aug 28, 2016
Latest reply on Aug 30, 2016 by Kerry Zhou

SIM->SOPT&= ~SIM_SOPT_SWDE_MASK; //0x8u 关闭SWD脚
SIM->SCGC&= ~SIM_SCGC_SWD_MASK; //0x2000u 关闭SWD时钟


GPIOA->PIDR&= (uint32_t)GPIO_PTA0_MASK; //禁用输入
GPIOA->PDDR|= (uint32_t)GPIO_PTA0_MASK; //输出方向
GPIOA->PSOR|= (uint32_t)GPIO_PTA0_MASK; //置位

GPIOA->PIDR|= (uint32_t)GPIO_PTA4_MASK; ///禁用输入
GPIOA->PDDR|= (uint32_t)GPIO_PTA4_MASK; //输出方向
GPIOA->PSOR|= (uint32_t)GPIO_PTA4_MASK; //置位

Outcomes