diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2016-05-23 21:59:17 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2016-05-23 21:59:17 +0200 |
commit | 6265025f7cd7f606b6da62c7add13a6008500cf7 (patch) | |
tree | 7761c2a2136ed59fab776c6e2c78427a3082fd10 /stm-init.c | |
parent | 50f9d40503e5f9cb24241c4c584db3cb94af07aa (diff) |
SDRAM initialization and test code from Pavel.
Integrated into the cli-test program as such:
cryptech> test sdram
Initializing SDRAM
Starting SDRAM test (n = 0)
Run sequential write-then-read test for the first chip
Run random write-then-read test for the first chip
Run sequential write-then-read test for the second chip
Run random write-then-read test for the second chip
Run interleaved write-then-read test for both chips at once
SDRAM test (n = 0) completed
SDRAM test completed successfully
cryptech>
Diffstat (limited to 'stm-init.c')
-rw-r--r-- | stm-init.c | 21 |
1 files changed, 0 insertions, 21 deletions
@@ -38,9 +38,6 @@ #ifdef HAL_GPIO_MODULE_ENABLED #include "stm-led.h" #endif -#ifdef HAL_SRAM_MODULE_ENABLED -#include "stm-fmc.h" -#endif #ifdef HAL_UART_MODULE_ENABLED #include "stm-uart.h" #endif @@ -143,24 +140,6 @@ static void MX_USART2_UART_Init(void) #ifdef HAL_GPIO_MODULE_ENABLED -#define gpio_output(output_port, output_pins, output_level) \ - /* Configure GPIO pin Output Level */ \ - HAL_GPIO_WritePin(output_port, output_pins, output_level); \ - /* Configure pin as output */ \ - GPIO_InitStruct.Pin = output_pins; \ - GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; \ - GPIO_InitStruct.Pull = GPIO_NOPULL; \ - GPIO_InitStruct.Speed = GPIO_SPEED_LOW; \ - HAL_GPIO_Init(output_port, &GPIO_InitStruct) - -#define gpio_input(input_port, input_pin, input_pull) \ - GPIO_InitStruct.Pin = input_pin; \ - GPIO_InitStruct.Mode = GPIO_MODE_INPUT; \ - GPIO_InitStruct.Pull = input_pull; \ - GPIO_InitStruct.Speed = GPIO_SPEED_LOW; \ - HAL_GPIO_Init(input_port, &GPIO_InitStruct) - - /* Configure General Purpose Input/Output pins */ static void MX_GPIO_Init(void) { |