MKE02z issue using SWD_CLK as GPIO

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MKE02z issue using SWD_CLK as GPIO

24 次查看
PabloBajista
Fresh Out Contributor

Hi.

 

I made a custom PCB with a MKE02Z32VLD2 (44 pins), and I need to use SWD_CLK and SWD_DIO as GPIO, which are PTC4 and PTA4 respectively.

 

The MCU halts at power-up. If I left unconnected PTC4, the MCU works perfectly, so I suspect the problem is a transient while power-up sequence, which produce noise on PTC4 before  enable PTA4 and PTC4 as GPIO with the next code:

 

SIM->SOPT &= ~(uint32_t)SIM_SOPT_SWDE_MASK;

 

MCU interprets this as a failed attempt to connect the debugger, and because that MCU halts.

 

The problem is really I don’t know how to fix it. Before this, I had another issue like this with PTB4 pin, which behaves as NMI by default but I needed to us it as GPIO. MCU halted, so I found the solution in the next topic:

 

https://community.nxp.com/t5/Kinetis-Microcontrollers/powering-up-issue-on-MKE02Z-GPIO/m-p/544613#M3...

 

But in my case, I have no idea how to fix this issue. Anyone could help me, please?

 

Thanks.

标签 (1)
0 项奖励
回复
0 回复数