usbcnc / grbl

This is a port of GRBL 1.1 to STM32F103 target
https://github.com/usbcnc/grbl/wiki
Other
206 stars 73 forks source link

coolant on PB3 doesn´t work #23

Closed alk1913 closed 7 years ago

alk1913 commented 7 years ago

i try to connect a relay to PB3 fora coolant fan ,but thisnot work.if i change thr pin for coolant from PB3 to PA9 this work perfectly. why happen that? thank you for your work!! and if you can help me with this!!!

usbcnc commented 7 years ago

PB3 default function is mapped to JTDO / TRACESWO. Need to disable it if PB3 is used.

usbcnc commented 7 years ago

Change RCC_APB2PeriphClockCmd(RCC_COOLANT_FLOOD_PORT, ENABLE); to RCC_APB2PeriphClockCmd(RCC_COOLANT_FLOOD_PORT| RCC_APB2Periph_AFIO , ENABLE); GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable , ENABLE);

PB3 then can be used.