Merge pull request #10471 from malavikasajikumar/master

SDP-K1: Updates to target code
pull/10529/head
Martin Kojtal 2019-05-02 19:03:22 +01:00 committed by GitHub
commit 87711a9111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 40 deletions

View File

@ -273,7 +273,7 @@ typedef enum {
A3 = PC_1,
A4 = PC_4,
A5 = PC_5,
D0 = PA_1,
D1 = PA_0,
D2 = PG_7,
@ -303,49 +303,52 @@ typedef enum {
STDIO_UART_RX = PD_2,
#endif
// Debug pins
DEBUG_GPIO0 = PG_6,
// Debug pins
DEBUG_GPIO0 = PG_6,
// Generic signals namings
LED1 = PK_4, // Status LED
LED2 = PK_7, // Red LED
LED3 = PK_6, // Orange LED
LED4 = PK_5, // Green LED
AWAKE = PK_3,
LED1 = PK_7, // Red LED
LED2 = PK_6, // Orange LED
LED3 = PK_5, // Green LED
LED_RED = LED1,
LED_ORANGE = LED2,
LED_GREEN = LED3,
SERIAL_TX = STDIO_UART_TX,
SERIAL_RX = STDIO_UART_RX,
USBTX = STDIO_UART_TX,
USBRX = STDIO_UART_RX,
I2C_SCL = PB_8,
I2C_SDA = PB_7,
SPI_MOSI = PA_7,
SPI_MISO = PB_4,
SPI_SCK = PB_3,
SPI_CS = PA_15, // SPI pins to Arduino connector
// Adding these signals for the SDP connector
SDP_SPI_MOSI = PF_9, // SDP Connector for SPI lines
SDP_SPI_MISO = PF_8,
SDP_SPI_SCK = PH_6,
SDP_SPI_CS_A = PB_9,
SDP_SPI_CS_B = PC_6,
SDP_SPI_CS_C = PC_7,
SDP_I2C_SDA = PC_9, // SDP Connector I2C lines
SDP_I2C_SCL = PH_7,
SDP_GPIO_0 = PJ_0, // SDP connector GPIO 0-7
SDP_GPIO_1 = PJ_1,
SDP_GPIO_2 = PJ_3,
SDP_GPIO_3 = PJ_4,
SDP_GPIO_4 = PJ_5,
SDP_GPIO_5 = PJ_12,
SDP_GPIO_6 = PJ_13,
SDP_GPIO_7 = PJ_14,
SDP_UART_TX = PD_5, // SDP connector UART
SDP_UART_RX = PD_6,
SDP_TMR_A = PB_14, // SDP connector TMR A, B & D
SDP_TMR_B = PE_6,
SDP_TMR_D = PC_8,
PWM_OUT = PA_1,
// SPI and I2C pins on Arduino connector
SPI_CS = D10,
SPI_MOSI = D11,
SPI_MISO = D12,
SPI_SCK = D13,
I2C_SDA = D14,
I2C_SCL = D15,
// Adding these signals for the SDP connector
SDP_SPI_MOSI = PF_9, // SDP Connector for SPI lines
SDP_SPI_MISO = PF_8,
SDP_SPI_SCK = PH_6,
SDP_SPI_CS_A = PB_9,
SDP_SPI_CS_B = PC_6,
SDP_SPI_CS_C = PC_7,
SDP_I2C_SDA = PC_9, // SDP Connector I2C lines
SDP_I2C_SCL = PH_7,
SDP_GPIO_0 = PJ_0, // SDP connector GPIO 0-7
SDP_GPIO_1 = PJ_1,
SDP_GPIO_2 = PJ_3,
SDP_GPIO_3 = PJ_4,
SDP_GPIO_4 = PJ_5,
SDP_GPIO_5 = PJ_12,
SDP_GPIO_6 = PJ_13,
SDP_GPIO_7 = PJ_14,
SDP_UART_TX = PD_5, // SDP connector UART
SDP_UART_RX = PD_6,
SDP_TMR_A = PB_14, // SDP connector TMR A, B & D
SDP_TMR_B = PE_6,
SDP_TMR_D = PC_8,
PWM_OUT = PA_1,
/**** USB pins ****/
USB_OTG_HS_DM = PB_14,

View File

@ -1,7 +1,7 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@ -58,6 +58,7 @@ uint8_t SetSysClock_PLL_HSE(uint8_t bypass);
uint8_t SetSysClock_PLL_HSI(void);
#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */
static void TurnOnAwakeSignal(void);
/**
* @brief Setup the microcontroller system
@ -102,6 +103,7 @@ void SystemInit(void)
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
#endif
TurnOnAwakeSignal();
}
@ -274,3 +276,27 @@ uint8_t SetSysClock_PLL_HSI(void)
return 1; // OK
}
#endif /* ((CLOCK_SOURCE) & USE_PLL_HSI) */
/**
* @brief Sets F469 "Awake" signal (PK3 pin) to turn on daughterboard power supplies
* @param None
* @retval None
*
*/
static void TurnOnAwakeSignal(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
/* Enable peripheral clock */
__HAL_RCC_GPIOK_CLK_ENABLE();
/* GPIO Configuration */
GPIO_InitStruct.Pin = GPIO_PIN_3;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(GPIOK, &GPIO_InitStruct);
/* Enable AWAKE pin */
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_SET);
}