Trying to fix timing issues
This commit is contained in:
parent
aee9c420d4
commit
85a95e04b8
@ -1,4 +1,4 @@
|
|||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file : main.h
|
* @file : main.h
|
||||||
@ -16,7 +16,7 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef __MAIN_H
|
#ifndef __MAIN_H
|
||||||
@ -30,31 +30,31 @@ extern "C" {
|
|||||||
#include "stm32f1xx_hal.h"
|
#include "stm32f1xx_hal.h"
|
||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Exported types ------------------------------------------------------------*/
|
/* Exported types ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN ET */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END ET */
|
||||||
|
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN EC */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END EC */
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN EM */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END EM */
|
||||||
|
|
||||||
/* Exported functions prototypes ---------------------------------------------*/
|
/* Exported functions prototypes ---------------------------------------------*/
|
||||||
void Error_Handler(void);
|
void Error_Handler(void);
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN EFP */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END EFP */
|
||||||
|
|
||||||
/* Private defines -----------------------------------------------------------*/
|
/* Private defines -----------------------------------------------------------*/
|
||||||
#define DB10_Pin GPIO_PIN_13
|
#define DB10_Pin GPIO_PIN_13
|
||||||
@ -112,9 +112,9 @@ void Error_Handler(void);
|
|||||||
#define DB12_Pin GPIO_PIN_9
|
#define DB12_Pin GPIO_PIN_9
|
||||||
#define DB12_GPIO_Port GPIOB
|
#define DB12_GPIO_Port GPIOB
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Private defines */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Private defines */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f1xx_hal_conf.h
|
* @file stm32f1xx_hal_conf.h
|
||||||
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||||
#ifndef __STM32F1xx_HAL_CONF_H
|
#ifndef __STM32F1xx_HAL_CONF_H
|
||||||
|
|||||||
@ -34,26 +34,26 @@ volatile uint16_t LCD_WIDTH = LCD_SCREEN_WIDTH;
|
|||||||
|
|
||||||
|
|
||||||
// Set all 16 data pins (DB0-DB15) based on a 16-bit value
|
// Set all 16 data pins (DB0-DB15) based on a 16-bit value
|
||||||
void SetDataPins(uint16_t value) {
|
//void SetDataPins(uint16_t value) {
|
||||||
GPIOA->BSRR = (value & (1 << 0) ? DB0_Pin : (DB0_Pin << 16)) | // DB0 (GPIOA)
|
// GPIOA->BSRR = (value & (1 << 0) ? DB0_Pin : (DB0_Pin << 16)) | // DB0 (GPIOA)
|
||||||
(value & (1 << 14) ? DB14_Pin : (DB14_Pin << 16)); // DB14 (GPIOA)
|
// (value & (1 << 14) ? DB14_Pin : (DB14_Pin << 16)); // DB14 (GPIOA)
|
||||||
GPIOB->BSRR = (value & (1 << 1) ? DB1_Pin : (DB1_Pin << 16)) | // DB1 (GPIOB)
|
// GPIOB->BSRR = (value & (1 << 1) ? DB1_Pin : (DB1_Pin << 16)) | // DB1 (GPIOB)
|
||||||
(value & (1 << 3) ? DB3_Pin : (DB3_Pin << 16)) | // DB3 (GPIOB)
|
// (value & (1 << 3) ? DB3_Pin : (DB3_Pin << 16)) | // DB3 (GPIOB)
|
||||||
(value & (1 << 5) ? DB5_Pin : (DB5_Pin << 16)) | // DB5 (GPIOB)
|
// (value & (1 << 5) ? DB5_Pin : (DB5_Pin << 16)) | // DB5 (GPIOB)
|
||||||
(value & (1 << 7) ? DB7_Pin : (DB7_Pin << 16)) | // DB7 (GPIOB)
|
// (value & (1 << 7) ? DB7_Pin : (DB7_Pin << 16)) | // DB7 (GPIOB)
|
||||||
(value & (1 << 9) ? DB9_Pin : (DB9_Pin << 16)) | // DB9 (GPIOB)
|
// (value & (1 << 9) ? DB9_Pin : (DB9_Pin << 16)) | // DB9 (GPIOB)
|
||||||
(value & (1 << 11) ? DB11_Pin : (DB11_Pin << 16)) | // DB11 (GPIOB)
|
// (value & (1 << 11) ? DB11_Pin : (DB11_Pin << 16)) | // DB11 (GPIOB)
|
||||||
(value & (1 << 12) ? DB12_Pin : (DB12_Pin << 16)) | // DB12 (GPIOB)
|
// (value & (1 << 12) ? DB12_Pin : (DB12_Pin << 16)) | // DB12 (GPIOB)
|
||||||
(value & (1 << 13) ? DB13_Pin : (DB13_Pin << 16)) | // DB13 (GPIOB)
|
// (value & (1 << 13) ? DB13_Pin : (DB13_Pin << 16)) | // DB13 (GPIOB)
|
||||||
(value & (1 << 15) ? DB15_Pin : (DB15_Pin << 16)); // DB15 (GPIOB)
|
// (value & (1 << 15) ? DB15_Pin : (DB15_Pin << 16)); // DB15 (GPIOB)
|
||||||
|
//
|
||||||
GPIOD->BSRR = (value & (1 << 2) ? DB2_Pin : (DB2_Pin << 16)) | // DB2 (GPIOD)
|
// GPIOD->BSRR = (value & (1 << 2) ? DB2_Pin : (DB2_Pin << 16)) | // DB2 (GPIOD)
|
||||||
(value & (1 << 4) ? DB4_Pin : (DB4_Pin << 16)); // DB4 (GPIOD)
|
// (value & (1 << 4) ? DB4_Pin : (DB4_Pin << 16)); // DB4 (GPIOD)
|
||||||
|
//
|
||||||
GPIOC->BSRR = (value & (1 << 6) ? DB6_Pin : (DB6_Pin << 16)) | // DB6 (GPIOC)
|
// GPIOC->BSRR = (value & (1 << 6) ? DB6_Pin : (DB6_Pin << 16)) | // DB6 (GPIOC)
|
||||||
(value & (1 << 8) ? DB8_Pin : (DB8_Pin << 16)) | // DB8 (GPIOC)
|
// (value & (1 << 8) ? DB8_Pin : (DB8_Pin << 16)) | // DB8 (GPIOC)
|
||||||
(value & (1 << 10) ? DB10_Pin : (DB10_Pin << 16)); // DB10 (GPIOC)
|
// (value & (1 << 10) ? DB10_Pin : (DB10_Pin << 16)); // DB10 (GPIOC)
|
||||||
}
|
//}
|
||||||
//void SetDataPins(uint16_t value) {
|
//void SetDataPins(uint16_t value) {
|
||||||
// // Reset all data pins to 0 first (using BRR)
|
// // Reset all data pins to 0 first (using BRR)
|
||||||
// GPIOA->BRR = DB0_Pin | DB14_Pin; // Reset DB0, DB14 (GPIOA)
|
// GPIOA->BRR = DB0_Pin | DB14_Pin; // Reset DB0, DB14 (GPIOA)
|
||||||
@ -80,80 +80,124 @@ void SetDataPins(uint16_t value) {
|
|||||||
// if (value & (1 << 14)) GPIOA->BSRR = DB14_Pin; // DB14 (GPIOA)
|
// if (value & (1 << 14)) GPIOA->BSRR = DB14_Pin; // DB14 (GPIOA)
|
||||||
// if (value & (1 << 15)) GPIOB->BSRR = DB15_Pin; // DB15 (GPIOB)
|
// if (value & (1 << 15)) GPIOB->BSRR = DB15_Pin; // DB15 (GPIOB)
|
||||||
//}
|
//}
|
||||||
//typedef struct {
|
typedef struct {
|
||||||
// GPIO_TypeDef* port;
|
GPIO_TypeDef* port;
|
||||||
// uint16_t pin;
|
uint16_t pin;
|
||||||
//} DataPin;
|
} DataPin;
|
||||||
|
|
||||||
|
// Map each data bit (DB0-DB15) to its GPIO port and pin
|
||||||
|
const DataPin dataPins[16] = {
|
||||||
|
{DB0_GPIO_Port, DB0_Pin}, // DB0
|
||||||
|
{DB1_GPIO_Port, DB1_Pin}, // DB1
|
||||||
|
{DB2_GPIO_Port, DB2_Pin}, // DB2
|
||||||
|
{DB3_GPIO_Port, DB3_Pin}, // DB3
|
||||||
|
{DB4_GPIO_Port, DB4_Pin}, // DB4
|
||||||
|
{DB5_GPIO_Port, DB5_Pin}, // DB5
|
||||||
|
{DB6_GPIO_Port, DB6_Pin}, // DB6
|
||||||
|
{DB7_GPIO_Port, DB7_Pin}, // DB7
|
||||||
|
{DB8_GPIO_Port, DB8_Pin}, // DB8
|
||||||
|
{DB9_GPIO_Port, DB9_Pin}, // DB9
|
||||||
|
{DB10_GPIO_Port, DB10_Pin}, // DB10
|
||||||
|
{DB11_GPIO_Port, DB11_Pin}, // DB11
|
||||||
|
{DB12_GPIO_Port, DB12_Pin}, // DB12
|
||||||
|
{DB13_GPIO_Port, DB13_Pin}, // DB13
|
||||||
|
{DB14_GPIO_Port, DB14_Pin}, // DB14
|
||||||
|
{DB15_GPIO_Port, DB15_Pin} // DB15
|
||||||
|
};
|
||||||
|
|
||||||
|
void SetDataPins(uint16_t value) {
|
||||||
|
for (int i = 0; i < 16; i++) {
|
||||||
|
// Check if the i-th bit in 'value' is set
|
||||||
|
GPIO_PinState state = (value & (1 << i)) ? GPIO_PIN_SET : GPIO_PIN_RESET;
|
||||||
|
|
||||||
|
// Write the state to the corresponding GPIO pin
|
||||||
|
HAL_GPIO_WritePin(dataPins[i].port, dataPins[i].pin, state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//void ScreenWriteCmd(uint16_t command) {
|
||||||
|
// MCU_RS_LOW();
|
||||||
|
// MCU_CS_LOW();
|
||||||
|
// SetDataPins(command);
|
||||||
|
// __NOP();
|
||||||
//
|
//
|
||||||
//// Map each data bit (DB0-DB15) to its GPIO port and pin
|
// MCU_WR_LOW();
|
||||||
//const DataPin dataPins[16] = {
|
// __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
// {DB0_GPIO_Port, DB0_Pin}, // DB0
|
// MCU_WR_HIGH();
|
||||||
// {DB1_GPIO_Port, DB1_Pin}, // DB1
|
// __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
// {DB2_GPIO_Port, DB2_Pin}, // DB2
|
|
||||||
// {DB3_GPIO_Port, DB3_Pin}, // DB3
|
|
||||||
// {DB4_GPIO_Port, DB4_Pin}, // DB4
|
|
||||||
// {DB5_GPIO_Port, DB5_Pin}, // DB5
|
|
||||||
// {DB6_GPIO_Port, DB6_Pin}, // DB6
|
|
||||||
// {DB7_GPIO_Port, DB7_Pin}, // DB7
|
|
||||||
// {DB8_GPIO_Port, DB8_Pin}, // DB8
|
|
||||||
// {DB9_GPIO_Port, DB9_Pin}, // DB9
|
|
||||||
// {DB10_GPIO_Port, DB10_Pin}, // DB10
|
|
||||||
// {DB11_GPIO_Port, DB11_Pin}, // DB11
|
|
||||||
// {DB12_GPIO_Port, DB12_Pin}, // DB12
|
|
||||||
// {DB13_GPIO_Port, DB13_Pin}, // DB13
|
|
||||||
// {DB14_GPIO_Port, DB14_Pin}, // DB14
|
|
||||||
// {DB15_GPIO_Port, DB15_Pin} // DB15
|
|
||||||
//};
|
|
||||||
//
|
//
|
||||||
//void SetDataPins(uint16_t value) {
|
// MCU_CS_HIGH();
|
||||||
// for (int i = 0; i < 16; i++) {
|
|
||||||
// // Check if the i-th bit in 'value' is set
|
|
||||||
// GPIO_PinState state = (value & (1 << i)) ? GPIO_PIN_SET : GPIO_PIN_RESET;
|
|
||||||
//
|
|
||||||
// // Write the state to the corresponding GPIO pin
|
|
||||||
// HAL_GPIO_WritePin(dataPins[i].port, dataPins[i].pin, state);
|
|
||||||
// }
|
|
||||||
//}
|
//}
|
||||||
|
//void ScreenWriteData(uint16_t data) {
|
||||||
|
// MCU_RS_HIGH();
|
||||||
|
// MCU_CS_LOW();
|
||||||
|
// SetDataPins(data);
|
||||||
|
// __NOP();
|
||||||
|
//
|
||||||
|
// MCU_WR_LOW();
|
||||||
|
// __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
|
// MCU_WR_HIGH();
|
||||||
|
// __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
|
//
|
||||||
|
// MCU_CS_HIGH();
|
||||||
|
//}
|
||||||
|
// Write Command (optimized for timing)
|
||||||
void ScreenWriteCmd(uint16_t command) {
|
void ScreenWriteCmd(uint16_t command) {
|
||||||
__NOP(); __NOP(); // ~32 ns
|
// 1. Set RS to command mode (t_AS = 10 ns)
|
||||||
|
|
||||||
MCU_RS_LOW();
|
MCU_RS_LOW();
|
||||||
//__NOP(); // ~16 ns
|
__NOP(); // 1 NOP = ~15.625 ns > 10 ns
|
||||||
MCU_CS_LOW();
|
|
||||||
__NOP(); // ~16 ns
|
|
||||||
MCU_WR_LOW();
|
|
||||||
__NOP(); // ~16 ns
|
|
||||||
|
|
||||||
|
// 2. Assert CS (t_AS = 10 ns)
|
||||||
|
MCU_CS_LOW();
|
||||||
|
__NOP(); // 1 NOP = ~15.625 ns > 10 ns
|
||||||
|
|
||||||
|
// 3. Set data pins (t_DSW = 10 ns)
|
||||||
SetDataPins(command);
|
SetDataPins(command);
|
||||||
__NOP();
|
__NOP(); // 1 NOP = ~15.625 ns > 10 ns
|
||||||
|
|
||||||
MCU_WR_HIGH();
|
// 4. Pulse WR low (PWLW = 50 ns)
|
||||||
__NOP();
|
|
||||||
|
|
||||||
MCU_CS_HIGH();
|
|
||||||
__NOP();
|
|
||||||
}
|
|
||||||
void ScreenWriteData(uint16_t data) {
|
|
||||||
__NOP(); __NOP(); // ~32 ns
|
|
||||||
|
|
||||||
MCU_RS_HIGH();
|
|
||||||
//__NOP(); // ~16 ns
|
|
||||||
MCU_CS_LOW();
|
|
||||||
__NOP(); // ~16 ns
|
|
||||||
MCU_WR_LOW();
|
MCU_WR_LOW();
|
||||||
__NOP(); // ~16 ns
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); // 4 NOPs = ~62.5 ns > 50 ns
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
SetDataPins(data);
|
|
||||||
__NOP();
|
|
||||||
|
|
||||||
MCU_WR_HIGH();
|
MCU_WR_HIGH();
|
||||||
__NOP();
|
|
||||||
|
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
|
// 5. Hold time (t_H = 15 ns)
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); // 4 NOPs
|
||||||
|
|
||||||
|
// 6. Deassert CS (t_AH = 5 ns)
|
||||||
MCU_CS_HIGH();
|
MCU_CS_HIGH();
|
||||||
__NOP();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Write Data (same timing as command)
|
||||||
|
void ScreenWriteData(uint16_t data) {
|
||||||
|
// 1. Set RS to data mode (t_AS = 10 ns)
|
||||||
|
MCU_RS_HIGH();
|
||||||
|
__NOP(); // 1 NOP
|
||||||
|
|
||||||
|
// 2. Assert CS (t_AS = 10 ns)
|
||||||
|
MCU_CS_LOW();
|
||||||
|
__NOP(); // 1 NOP
|
||||||
|
|
||||||
|
// 3. Set data pins (t_DSW = 10 ns)
|
||||||
|
SetDataPins(data);
|
||||||
|
__NOP(); // 1 NOP
|
||||||
|
|
||||||
|
// 4. Pulse WR low (PWLW = 50 ns)
|
||||||
|
MCU_WR_LOW();
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); // 4 NOPs
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
|
MCU_WR_HIGH();
|
||||||
|
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP(); __NOP();
|
||||||
|
// 5. Hold time (t_H = 15 ns)
|
||||||
|
__NOP(); __NOP(); __NOP(); __NOP(); // 4 NOPs
|
||||||
|
|
||||||
|
// 6. Deassert CS (t_AH = 5 ns)
|
||||||
|
MCU_CS_HIGH();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Send command (char) to LCD via SPI bus */
|
/* Send command (char) to LCD via SPI bus */
|
||||||
void LCD_Write_Command(uint8_t Command) {
|
void LCD_Write_Command(uint8_t Command) {
|
||||||
@ -200,46 +244,42 @@ void LCD_HardwareReset() {
|
|||||||
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_RESET);
|
||||||
HAL_Delay(20);
|
HAL_Delay(20);
|
||||||
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(DRESET_GPIO_Port, DRESET_Pin, GPIO_PIN_SET);
|
||||||
HAL_Delay(150);
|
HAL_Delay(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCD_Init(void) {
|
void LCD_Init(void) {
|
||||||
|
|
||||||
|
MCU_RD_HIGH();
|
||||||
LCD_HardwareReset();
|
LCD_HardwareReset();
|
||||||
|
|
||||||
// enable spi1
|
|
||||||
//SPI1->CR1 |= SPI_CR1_SPE;// NSS (CS) pin is automatically pulled low
|
|
||||||
HAL_Delay(300);
|
|
||||||
|
|
||||||
// Software reset
|
// Software reset
|
||||||
ScreenWriteCmd(0x01); // 1
|
ScreenWriteCmd(0x01); // 1
|
||||||
HAL_Delay(150);
|
HAL_Delay(150);
|
||||||
|
|
||||||
// Color mode: 16bit/pixels
|
// Color mode: 16bit/pixels
|
||||||
ScreenWriteCmd(0x3A); // 0111010
|
ScreenWriteCmd(0x3A);
|
||||||
ScreenWriteData(0x55);// 1010101
|
ScreenWriteData(0x55);
|
||||||
// 1010001
|
HAL_Delay(10);
|
||||||
HAL_Delay(150);
|
|
||||||
|
|
||||||
// Enable color inversion (INVON)
|
// Enable color inversion (INVON)
|
||||||
ScreenWriteCmd(0x21); // 0100001
|
//ScreenWriteCmd(0x21); // 0100001
|
||||||
// 1010001
|
// 1010001
|
||||||
|
|
||||||
// Configure orientation stuff
|
// Configure orientation stuff
|
||||||
ScreenWriteCmd(0x36);
|
//ScreenWriteCmd(0x36);
|
||||||
ScreenWriteData(0b10110100);
|
//ScreenWriteData(0b10110100);
|
||||||
|
|
||||||
|
|
||||||
// Exit sleep
|
// Exit sleep
|
||||||
ScreenWriteCmd(0x11);
|
ScreenWriteCmd(0x11);
|
||||||
HAL_Delay(150);
|
HAL_Delay(120);
|
||||||
|
|
||||||
// Turn on display
|
// Turn on display
|
||||||
ScreenWriteCmd(0x29);
|
ScreenWriteCmd(0x29);
|
||||||
HAL_Delay(400);
|
HAL_Delay(100);
|
||||||
|
|
||||||
// Fill white
|
// Fill white
|
||||||
LCD_Fill_Screen(WHITE);
|
LCD_Fill_Screen(RED);
|
||||||
|
|
||||||
// Draw colors columns
|
// Draw colors columns
|
||||||
// LCD_Set_Address(30, 30, LCD_SCREEN_WIDTH - 30, LCD_SCREEN_HEIGHT - 30);
|
// LCD_Set_Address(30, 30, LCD_SCREEN_WIDTH - 30, LCD_SCREEN_HEIGHT - 30);
|
||||||
|
|||||||
124
Core/Src/main.c
124
Core/Src/main.c
@ -1,4 +1,4 @@
|
|||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file : main.c
|
* @file : main.c
|
||||||
@ -15,49 +15,49 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END */
|
/* USER CODE END Header */
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PTD */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PTD */
|
||||||
|
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PD */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PD */
|
||||||
|
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PM */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PM */
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
UART_HandleTypeDef huart1;
|
UART_HandleTypeDef huart1;
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PV */
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
void SystemClock_Config(void);
|
void SystemClock_Config(void);
|
||||||
static void MX_GPIO_Init(void);
|
static void MX_GPIO_Init(void);
|
||||||
static void MX_USART1_UART_Init(void);
|
static void MX_USART1_UART_Init(void);
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
/* Private user code ---------------------------------------------------------*/
|
/* Private user code ---------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 0 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief The application entry point.
|
* @brief The application entry point.
|
||||||
@ -66,45 +66,45 @@ static void MX_USART1_UART_Init(void);
|
|||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 1 */
|
||||||
|
|
||||||
/* MCU Configuration--------------------------------------------------------*/
|
/* MCU Configuration--------------------------------------------------------*/
|
||||||
|
|
||||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
|
||||||
HAL_Init();
|
HAL_Init();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Init */
|
||||||
|
|
||||||
/* Configure the system clock */
|
/* Configure the system clock */
|
||||||
SystemClock_Config();
|
SystemClock_Config();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN SysInit */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END SysInit */
|
||||||
|
|
||||||
/* Initialize all configured peripherals */
|
/* Initialize all configured peripherals */
|
||||||
MX_GPIO_Init();
|
MX_GPIO_Init();
|
||||||
MX_USART1_UART_Init();
|
MX_USART1_UART_Init();
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 2 */
|
||||||
|
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN WHILE */
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* USER CODE END */
|
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
|
||||||
LCD_Init();
|
LCD_Init();
|
||||||
HAL_Delay(3000);
|
HAL_Delay(1000);
|
||||||
__NOP();
|
__NOP();
|
||||||
|
/* USER CODE END WHILE */
|
||||||
|
|
||||||
|
/* USER CODE BEGIN 3 */
|
||||||
}
|
}
|
||||||
/* USER CODE END */
|
/* USER CODE END 3 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,13 +153,13 @@ void SystemClock_Config(void)
|
|||||||
static void MX_USART1_UART_Init(void)
|
static void MX_USART1_UART_Init(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 0 */
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 1 */
|
||||||
huart1.Instance = USART1;
|
huart1.Instance = USART1;
|
||||||
huart1.Init.BaudRate = 115200;
|
huart1.Init.BaudRate = 115200;
|
||||||
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
huart1.Init.WordLength = UART_WORDLENGTH_8B;
|
||||||
@ -172,9 +172,9 @@ static void MX_USART1_UART_Init(void)
|
|||||||
{
|
{
|
||||||
Error_Handler();
|
Error_Handler();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_Init 2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_Init 2 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,9 +186,9 @@ static void MX_USART1_UART_Init(void)
|
|||||||
static void MX_GPIO_Init(void)
|
static void MX_GPIO_Init(void)
|
||||||
{
|
{
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MX_GPIO_Init_1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MX_GPIO_Init_1 */
|
||||||
|
|
||||||
/* GPIO Ports Clock Enable */
|
/* GPIO Ports Clock Enable */
|
||||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
@ -218,20 +218,27 @@ static void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Pin = DB10_Pin|DB8_Pin|DB6_Pin;
|
GPIO_InitStruct.Pin = DB10_Pin|DB8_Pin|DB6_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : DB4_Pin DB2_Pin */
|
/*Configure GPIO pins : DB4_Pin DB2_Pin */
|
||||||
GPIO_InitStruct.Pin = DB4_Pin|DB2_Pin;
|
GPIO_InitStruct.Pin = DB4_Pin|DB2_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pins : DB0_Pin DRESET_Pin DCX_Pin MCU_CS_Pin
|
/*Configure GPIO pins : DB0_Pin DCX_Pin MCU_CS_Pin MCU_WR_Pin
|
||||||
MCU_WR_Pin IM2_Pin IM1_Pin DB14_Pin */
|
DB14_Pin */
|
||||||
GPIO_InitStruct.Pin = DB0_Pin|DRESET_Pin|DCX_Pin|MCU_CS_Pin
|
GPIO_InitStruct.Pin = DB0_Pin|DCX_Pin|MCU_CS_Pin|MCU_WR_Pin
|
||||||
|MCU_WR_Pin|IM2_Pin|IM1_Pin|DB14_Pin;
|
|DB14_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pins : DRESET_Pin IM2_Pin IM1_Pin */
|
||||||
|
GPIO_InitStruct.Pin = DRESET_Pin|IM2_Pin|IM1_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
@ -251,26 +258,33 @@ static void MX_GPIO_Init(void)
|
|||||||
|
|
||||||
/*Configure GPIO pins : DB1_Pin DB3_Pin DB5_Pin DB7_Pin
|
/*Configure GPIO pins : DB1_Pin DB3_Pin DB5_Pin DB7_Pin
|
||||||
DB9_Pin DB11_Pin DB13_Pin DB15_Pin
|
DB9_Pin DB11_Pin DB13_Pin DB15_Pin
|
||||||
IM0_Pin DRDX_Pin DB12_Pin */
|
DRDX_Pin DB12_Pin */
|
||||||
GPIO_InitStruct.Pin = DB1_Pin|DB3_Pin|DB5_Pin|DB7_Pin
|
GPIO_InitStruct.Pin = DB1_Pin|DB3_Pin|DB5_Pin|DB7_Pin
|
||||||
|DB9_Pin|DB11_Pin|DB13_Pin|DB15_Pin
|
|DB9_Pin|DB11_Pin|DB13_Pin|DB15_Pin
|
||||||
|IM0_Pin|DRDX_Pin|DB12_Pin;
|
|DRDX_Pin|DB12_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||||
|
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : IM0_Pin */
|
||||||
|
GPIO_InitStruct.Pin = IM0_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
HAL_GPIO_Init(IM0_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure peripheral I/O remapping */
|
/*Configure peripheral I/O remapping */
|
||||||
__HAL_AFIO_REMAP_PD01_ENABLE();
|
__HAL_AFIO_REMAP_PD01_ENABLE();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MX_GPIO_Init_2 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 4 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 4 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function is executed in case of error occurrence.
|
* @brief This function is executed in case of error occurrence.
|
||||||
@ -278,13 +292,13 @@ static void MX_GPIO_Init(void)
|
|||||||
*/
|
*/
|
||||||
void Error_Handler(void)
|
void Error_Handler(void)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Error_Handler_Debug */
|
||||||
/* User can add his own implementation to report the HAL error return state */
|
/* User can add his own implementation to report the HAL error return state */
|
||||||
__disable_irq();
|
__disable_irq();
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
/* USER CODE END */
|
/* USER CODE END Error_Handler_Debug */
|
||||||
}
|
}
|
||||||
#ifdef USE_FULL_ASSERT
|
#ifdef USE_FULL_ASSERT
|
||||||
/**
|
/**
|
||||||
@ -296,9 +310,9 @@ void Error_Handler(void)
|
|||||||
*/
|
*/
|
||||||
void assert_failed(uint8_t *file, uint32_t line)
|
void assert_failed(uint8_t *file, uint32_t line)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 6 */
|
||||||
/* User can add his own implementation to report the file name and line number,
|
/* User can add his own implementation to report the file name and line number,
|
||||||
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
|
||||||
/* USER CODE END */
|
/* USER CODE END 6 */
|
||||||
}
|
}
|
||||||
#endif /* USE_FULL_ASSERT */
|
#endif /* USE_FULL_ASSERT */
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file stm32f1xx_hal_msp.c
|
* @file stm32f1xx_hal_msp.c
|
||||||
@ -16,56 +16,56 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* USER CODE END */
|
/* USER CODE END Header */
|
||||||
|
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Includes */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN TD */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END TD */
|
||||||
|
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Define */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Define */
|
||||||
|
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN Macro */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END Macro */
|
||||||
|
|
||||||
/* Private variables ---------------------------------------------------------*/
|
/* Private variables ---------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PV */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PV */
|
||||||
|
|
||||||
/* Private function prototypes -----------------------------------------------*/
|
/* Private function prototypes -----------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN PFP */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END PFP */
|
||||||
|
|
||||||
/* External functions --------------------------------------------------------*/
|
/* External functions --------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN ExternalFunctions */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END ExternalFunctions */
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 0 */
|
||||||
/**
|
/**
|
||||||
* Initializes the Global MSP.
|
* Initializes the Global MSP.
|
||||||
*/
|
*/
|
||||||
void HAL_MspInit(void)
|
void HAL_MspInit(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MspInit 0 */
|
||||||
|
|
||||||
__HAL_RCC_AFIO_CLK_ENABLE();
|
__HAL_RCC_AFIO_CLK_ENABLE();
|
||||||
__HAL_RCC_PWR_CLK_ENABLE();
|
__HAL_RCC_PWR_CLK_ENABLE();
|
||||||
@ -76,9 +76,9 @@ void HAL_MspInit(void)
|
|||||||
*/
|
*/
|
||||||
__HAL_AFIO_REMAP_SWJ_NOJTAG();
|
__HAL_AFIO_REMAP_SWJ_NOJTAG();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN MspInit 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END MspInit 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -92,9 +92,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
if(huart->Instance==USART1)
|
if(huart->Instance==USART1)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_MspInit 0 */
|
||||||
/* Peripheral clock enable */
|
/* Peripheral clock enable */
|
||||||
__HAL_RCC_USART1_CLK_ENABLE();
|
__HAL_RCC_USART1_CLK_ENABLE();
|
||||||
|
|
||||||
@ -115,9 +115,9 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
|
|||||||
|
|
||||||
__HAL_AFIO_REMAP_USART1_ENABLE();
|
__HAL_AFIO_REMAP_USART1_ENABLE();
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_MspInit 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_MspInit 1 */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,9 +133,9 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
|||||||
{
|
{
|
||||||
if(huart->Instance==USART1)
|
if(huart->Instance==USART1)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_MspDeInit 0 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_MspDeInit 0 */
|
||||||
/* Peripheral clock disable */
|
/* Peripheral clock disable */
|
||||||
__HAL_RCC_USART1_CLK_DISABLE();
|
__HAL_RCC_USART1_CLK_DISABLE();
|
||||||
|
|
||||||
@ -145,13 +145,13 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
|||||||
*/
|
*/
|
||||||
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
|
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN USART1_MspDeInit 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END USART1_MspDeInit 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN */
|
/* USER CODE BEGIN 1 */
|
||||||
|
|
||||||
/* USER CODE END */
|
/* USER CODE END 1 */
|
||||||
|
|||||||
@ -66,16 +66,18 @@ NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
|||||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||||
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false
|
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false
|
||||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||||
PA0-WKUP.GPIOParameters=GPIO_Label
|
PA0-WKUP.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PA0-WKUP.GPIO_Label=DB0
|
PA0-WKUP.GPIO_Label=DB0
|
||||||
|
PA0-WKUP.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PA0-WKUP.Locked=true
|
PA0-WKUP.Locked=true
|
||||||
PA0-WKUP.Signal=GPIO_Output
|
PA0-WKUP.Signal=GPIO_Output
|
||||||
PA1.GPIOParameters=GPIO_Label
|
PA1.GPIOParameters=GPIO_Label
|
||||||
PA1.GPIO_Label=DRESET
|
PA1.GPIO_Label=DRESET
|
||||||
PA1.Locked=true
|
PA1.Locked=true
|
||||||
PA1.Signal=GPIO_Output
|
PA1.Signal=GPIO_Output
|
||||||
PA10.GPIOParameters=GPIO_Label
|
PA10.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PA10.GPIO_Label=DB14
|
PA10.GPIO_Label=DB14
|
||||||
|
PA10.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PA10.Locked=true
|
PA10.Locked=true
|
||||||
PA10.Signal=GPIO_Output
|
PA10.Signal=GPIO_Output
|
||||||
PA11.GPIOParameters=GPIO_Label
|
PA11.GPIOParameters=GPIO_Label
|
||||||
@ -96,16 +98,19 @@ PA2.GPIOParameters=GPIO_Label
|
|||||||
PA2.GPIO_Label=DTE
|
PA2.GPIO_Label=DTE
|
||||||
PA2.Locked=true
|
PA2.Locked=true
|
||||||
PA2.Signal=GPIO_Input
|
PA2.Signal=GPIO_Input
|
||||||
PA3.GPIOParameters=GPIO_Label
|
PA3.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PA3.GPIO_Label=DCX
|
PA3.GPIO_Label=DCX
|
||||||
|
PA3.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PA3.Locked=true
|
PA3.Locked=true
|
||||||
PA3.Signal=GPIO_Output
|
PA3.Signal=GPIO_Output
|
||||||
PA4.GPIOParameters=GPIO_Label
|
PA4.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PA4.GPIO_Label=MCU_CS
|
PA4.GPIO_Label=MCU_CS
|
||||||
|
PA4.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PA4.Locked=true
|
PA4.Locked=true
|
||||||
PA4.Signal=GPIO_Output
|
PA4.Signal=GPIO_Output
|
||||||
PA5.GPIOParameters=GPIO_Label
|
PA5.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PA5.GPIO_Label=MCU_WR
|
PA5.GPIO_Label=MCU_WR
|
||||||
|
PA5.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PA5.Locked=true
|
PA5.Locked=true
|
||||||
PA5.Signal=GPIO_Output
|
PA5.Signal=GPIO_Output
|
||||||
PA6.Locked=true
|
PA6.Locked=true
|
||||||
@ -124,32 +129,39 @@ PA9.GPIO_Speed=GPIO_SPEED_FREQ_LOW
|
|||||||
PA9.Locked=true
|
PA9.Locked=true
|
||||||
PA9.PinState=GPIO_PIN_SET
|
PA9.PinState=GPIO_PIN_SET
|
||||||
PA9.Signal=GPIO_Output
|
PA9.Signal=GPIO_Output
|
||||||
PB0.GPIOParameters=GPIO_Label
|
PB0.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB0.GPIO_Label=DB1
|
PB0.GPIO_Label=DB1
|
||||||
|
PB0.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB0.Locked=true
|
PB0.Locked=true
|
||||||
PB0.Signal=GPIO_Output
|
PB0.Signal=GPIO_Output
|
||||||
PB1.GPIOParameters=GPIO_Label
|
PB1.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB1.GPIO_Label=DB3
|
PB1.GPIO_Label=DB3
|
||||||
|
PB1.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB1.Locked=true
|
PB1.Locked=true
|
||||||
PB1.Signal=GPIO_Output
|
PB1.Signal=GPIO_Output
|
||||||
PB10.GPIOParameters=GPIO_Label
|
PB10.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB10.GPIO_Label=DB7
|
PB10.GPIO_Label=DB7
|
||||||
|
PB10.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB10.Locked=true
|
PB10.Locked=true
|
||||||
PB10.Signal=GPIO_Output
|
PB10.Signal=GPIO_Output
|
||||||
PB11.GPIOParameters=GPIO_Label
|
PB11.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB11.GPIO_Label=DB9
|
PB11.GPIO_Label=DB9
|
||||||
|
PB11.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB11.Locked=true
|
PB11.Locked=true
|
||||||
PB11.Signal=GPIO_Output
|
PB11.Signal=GPIO_Output
|
||||||
PB12.GPIOParameters=GPIO_Label
|
PB12.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB12.GPIO_Label=DB11
|
PB12.GPIO_Label=DB11
|
||||||
|
PB12.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB12.Locked=true
|
PB12.Locked=true
|
||||||
PB12.Signal=GPIO_Output
|
PB12.Signal=GPIO_Output
|
||||||
PB13.GPIOParameters=GPIO_Label
|
PB13.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB13.GPIO_Label=DB13
|
PB13.GPIO_Label=DB13
|
||||||
|
PB13.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB13.Locked=true
|
PB13.Locked=true
|
||||||
PB13.Signal=GPIO_Output
|
PB13.Signal=GPIO_Output
|
||||||
PB14.GPIOParameters=GPIO_Label
|
PB14.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB14.GPIO_Label=DB15
|
PB14.GPIO_Label=DB15
|
||||||
|
PB14.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB14.Locked=true
|
PB14.Locked=true
|
||||||
PB14.Signal=GPIO_Output
|
PB14.Signal=GPIO_Output
|
||||||
PB15.GPIOParameters=PinState,GPIO_Label
|
PB15.GPIOParameters=PinState,GPIO_Label
|
||||||
@ -157,14 +169,16 @@ PB15.GPIO_Label=IM0
|
|||||||
PB15.Locked=true
|
PB15.Locked=true
|
||||||
PB15.PinState=GPIO_PIN_RESET
|
PB15.PinState=GPIO_PIN_RESET
|
||||||
PB15.Signal=GPIO_Output
|
PB15.Signal=GPIO_Output
|
||||||
PB2.GPIOParameters=GPIO_Label
|
PB2.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB2.GPIO_Label=DB5
|
PB2.GPIO_Label=DB5
|
||||||
|
PB2.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB2.Locked=true
|
PB2.Locked=true
|
||||||
PB2.Signal=GPIO_Output
|
PB2.Signal=GPIO_Output
|
||||||
PB3.Locked=true
|
PB3.Locked=true
|
||||||
PB3.Signal=SYS_JTDO-TRACESWO
|
PB3.Signal=SYS_JTDO-TRACESWO
|
||||||
PB5.GPIOParameters=GPIO_Label
|
PB5.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB5.GPIO_Label=DRDX
|
PB5.GPIO_Label=DRDX
|
||||||
|
PB5.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB5.Locked=true
|
PB5.Locked=true
|
||||||
PB5.Signal=GPIO_Output
|
PB5.Signal=GPIO_Output
|
||||||
PB6.Locked=true
|
PB6.Locked=true
|
||||||
@ -173,28 +187,34 @@ PB6.Signal=USART1_TX
|
|||||||
PB7.Locked=true
|
PB7.Locked=true
|
||||||
PB7.Mode=Asynchronous
|
PB7.Mode=Asynchronous
|
||||||
PB7.Signal=USART1_RX
|
PB7.Signal=USART1_RX
|
||||||
PB9.GPIOParameters=GPIO_Label
|
PB9.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PB9.GPIO_Label=DB12
|
PB9.GPIO_Label=DB12
|
||||||
|
PB9.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PB9.Locked=true
|
PB9.Locked=true
|
||||||
PB9.Signal=GPIO_Output
|
PB9.Signal=GPIO_Output
|
||||||
PC13-TAMPER-RTC.GPIOParameters=GPIO_Label
|
PC13-TAMPER-RTC.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PC13-TAMPER-RTC.GPIO_Label=DB10
|
PC13-TAMPER-RTC.GPIO_Label=DB10
|
||||||
|
PC13-TAMPER-RTC.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PC13-TAMPER-RTC.Locked=true
|
PC13-TAMPER-RTC.Locked=true
|
||||||
PC13-TAMPER-RTC.Signal=GPIO_Output
|
PC13-TAMPER-RTC.Signal=GPIO_Output
|
||||||
PC14-OSC32_IN.GPIOParameters=GPIO_Label
|
PC14-OSC32_IN.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PC14-OSC32_IN.GPIO_Label=DB8
|
PC14-OSC32_IN.GPIO_Label=DB8
|
||||||
|
PC14-OSC32_IN.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PC14-OSC32_IN.Locked=true
|
PC14-OSC32_IN.Locked=true
|
||||||
PC14-OSC32_IN.Signal=GPIO_Output
|
PC14-OSC32_IN.Signal=GPIO_Output
|
||||||
PC15-OSC32_OUT.GPIOParameters=GPIO_Label
|
PC15-OSC32_OUT.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PC15-OSC32_OUT.GPIO_Label=DB6
|
PC15-OSC32_OUT.GPIO_Label=DB6
|
||||||
|
PC15-OSC32_OUT.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PC15-OSC32_OUT.Locked=true
|
PC15-OSC32_OUT.Locked=true
|
||||||
PC15-OSC32_OUT.Signal=GPIO_Output
|
PC15-OSC32_OUT.Signal=GPIO_Output
|
||||||
PD0-OSC_IN.GPIOParameters=GPIO_Label
|
PD0-OSC_IN.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PD0-OSC_IN.GPIO_Label=DB4
|
PD0-OSC_IN.GPIO_Label=DB4
|
||||||
|
PD0-OSC_IN.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PD0-OSC_IN.Locked=true
|
PD0-OSC_IN.Locked=true
|
||||||
PD0-OSC_IN.Signal=GPIO_Output
|
PD0-OSC_IN.Signal=GPIO_Output
|
||||||
PD1-OSC_OUT.GPIOParameters=GPIO_Label
|
PD1-OSC_OUT.GPIOParameters=GPIO_Speed,GPIO_Label
|
||||||
PD1-OSC_OUT.GPIO_Label=DB2
|
PD1-OSC_OUT.GPIO_Label=DB2
|
||||||
|
PD1-OSC_OUT.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
|
||||||
PD1-OSC_OUT.Locked=true
|
PD1-OSC_OUT.Locked=true
|
||||||
PD1-OSC_OUT.Signal=GPIO_Output
|
PD1-OSC_OUT.Signal=GPIO_Output
|
||||||
PinOutPanel.RotationAngle=-90
|
PinOutPanel.RotationAngle=-90
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user