Skip to content

SDP-K1: Updates to target code #10471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,22 +306,25 @@ typedef enum {
// 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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix alignment in this file (LED_ORANGE aligned with LED_RED and others for instance)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @0xc0170.
e0faeb2

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


// 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,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2019 ARM Limited
* Copyright (c) 2006-2017 ARM Limited
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2019 as this one is being edited this year

* 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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -102,6 +103,7 @@ void SystemInit(void)
SCB->VTOR = NVIC_FLASH_VECTOR_ADDRESS; /* Vector Table Relocation in Internal FLASH */
#endif

TurnOnAwakeSignal();
}


Expand Down Expand Up @@ -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);
}