mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
Get A13/A14 working on Espruino board (these were JTAG)
This commit is contained in:
parent
412fd7de2c
commit
d91ee0519e
@ -669,6 +669,11 @@ void jshInit() {
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_NoJTRST, ENABLE);
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_JTAGDisable, ENABLE);
|
||||
#endif
|
||||
#ifdef ESPRUINOBOARD
|
||||
// reclaim A13 and A14 (do we need the two above now?)
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); // Disable JTAG/SWD so pins are available
|
||||
#endif
|
||||
|
||||
|
||||
NVIC_InitTypeDef NVIC_InitStructure;
|
||||
/* Note, DO NOT set SysTicck priority using NVIC_Init. It is done above by NVIC_SetPriority */
|
||||
|
||||
@ -174,6 +174,10 @@ void initHardware() {
|
||||
RCC_APB2Periph_GPIOG |
|
||||
RCC_APB2Periph_AFIO, ENABLE);
|
||||
#endif
|
||||
#ifdef ESPRUINOBOARD
|
||||
// reclaim A13 and A14 (do we need the two above now?)
|
||||
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); // Disable JTAG/SWD so pins are available
|
||||
#endif
|
||||
|
||||
RCC_PCLK1Config(RCC_HCLK_Div8); // PCLK1 must be >8 Mhz for USB to work
|
||||
RCC_PCLK2Config(RCC_HCLK_Div16);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user