|
1 | 1 | /* mbed Microcontroller Library
|
2 |
| -* Copyright (c) 2006-2019 ARM Limited |
| 2 | +* Copyright (c) 2006-2017 ARM Limited |
3 | 3 | * SPDX-License-Identifier: Apache-2.0
|
4 |
| -
|
| 4 | +* |
5 | 5 | * Licensed under the Apache License, Version 2.0 (the "License");
|
6 | 6 | * you may not use this file except in compliance with the License.
|
7 | 7 | * You may obtain a copy of the License at
|
@@ -58,6 +58,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass);
|
58 | 58 | uint8_t SetSysClock_PLL_HSI(void);
|
59 | 59 | #endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */
|
60 | 60 |
|
| 61 | +static void TurnOnAwakeSignal(void); |
61 | 62 |
|
62 | 63 | /**
|
63 | 64 | * @brief Setup the microcontroller system
|
@@ -102,6 +103,7 @@ void SystemInit(void)
|
102 | 103 | SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
|
103 | 104 | #endif
|
104 | 105 |
|
| 106 | + TurnOnAwakeSignal(); |
105 | 107 | }
|
106 | 108 |
|
107 | 109 |
|
@@ -274,3 +276,27 @@ uint8_t SetSysClock_PLL_HSI(void)
|
274 | 276 | return 1; // OK
|
275 | 277 | }
|
276 | 278 | #endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */
|
| 279 | + |
| 280 | +/** |
| 281 | + * @brief Sets F469 "Awake" signal (PK3 pin) to turn on daughterboard power supplies |
| 282 | + * @param None |
| 283 | + * @retval None |
| 284 | + * |
| 285 | + */ |
| 286 | +static void TurnOnAwakeSignal(void) |
| 287 | +{ |
| 288 | + GPIO_InitTypeDef GPIO_InitStruct; |
| 289 | + |
| 290 | + /* Enable peripheral clock */ |
| 291 | + __HAL_RCC_GPIOK_CLK_ENABLE(); |
| 292 | + |
| 293 | + /* GPIO Configuration */ |
| 294 | + GPIO_InitStruct.Pin = GPIO_PIN_3; |
| 295 | + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; |
| 296 | + GPIO_InitStruct.Pull = GPIO_NOPULL; |
| 297 | + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; |
| 298 | + HAL_GPIO_Init(GPIOK, &GPIO_InitStruct); |
| 299 | + |
| 300 | + /* Enable AWAKE pin */ |
| 301 | + HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET); |
| 302 | +} |
0 commit comments