This commit is contained in:
parent
8a52221917
commit
4f07311ac3
|
@ -6,6 +6,7 @@
|
||||||
"user_fmsc.h": "c",
|
"user_fmsc.h": "c",
|
||||||
"fsmc.h": "c",
|
"fsmc.h": "c",
|
||||||
"ch438q.h": "c",
|
"ch438q.h": "c",
|
||||||
"ht1200m.h": "c"
|
"ht1200m.h": "c",
|
||||||
|
"main.h": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -64,11 +64,15 @@ void Error_Handler(void);
|
||||||
#define HART_CLK_GPIO_Port GPIOA
|
#define HART_CLK_GPIO_Port GPIOA
|
||||||
#define HART_ALL_RST_Pin GPIO_PIN_4
|
#define HART_ALL_RST_Pin GPIO_PIN_4
|
||||||
#define HART_ALL_RST_GPIO_Port GPIOA
|
#define HART_ALL_RST_GPIO_Port GPIOA
|
||||||
|
#define CH438_1_AMOD_Pin GPIO_PIN_14
|
||||||
|
#define CH438_1_AMOD_GPIO_Port GPIOF
|
||||||
#define HART1_RTS_Pin GPIO_PIN_4
|
#define HART1_RTS_Pin GPIO_PIN_4
|
||||||
#define HART1_RTS_GPIO_Port GPIOG
|
#define HART1_RTS_GPIO_Port GPIOG
|
||||||
#define CH438_INT_Pin GPIO_PIN_2
|
#define CH438_INT_Pin GPIO_PIN_2
|
||||||
#define CH438_INT_GPIO_Port GPIOD
|
#define CH438_INT_GPIO_Port GPIOD
|
||||||
#define CH438_INT_EXTI_IRQn EXTI2_IRQn
|
#define CH438_INT_EXTI_IRQn EXTI2_IRQn
|
||||||
|
#define CH438_1_RST_Pin GPIO_PIN_3
|
||||||
|
#define CH438_1_RST_GPIO_Port GPIOD
|
||||||
#define DAC1_CS_Pin GPIO_PIN_6
|
#define DAC1_CS_Pin GPIO_PIN_6
|
||||||
#define DAC1_CS_GPIO_Port GPIOB
|
#define DAC1_CS_GPIO_Port GPIOB
|
||||||
|
|
||||||
|
|
|
@ -85,8 +85,7 @@ void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer, StackTyp
|
||||||
* @param None
|
* @param None
|
||||||
* @retval None
|
* @retval None
|
||||||
*/
|
*/
|
||||||
void MX_FREERTOS_Init(void)
|
void MX_FREERTOS_Init(void) {
|
||||||
{
|
|
||||||
/* USER CODE BEGIN Init */
|
/* USER CODE BEGIN Init */
|
||||||
|
|
||||||
/* USER CODE END Init */
|
/* USER CODE END Init */
|
||||||
|
@ -123,6 +122,7 @@ void MX_FREERTOS_Init(void)
|
||||||
/* USER CODE BEGIN RTOS_THREADS */
|
/* USER CODE BEGIN RTOS_THREADS */
|
||||||
/* add threads, ... */
|
/* add threads, ... */
|
||||||
/* USER CODE END RTOS_THREADS */
|
/* USER CODE END RTOS_THREADS */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN Header_start_lwip_task */
|
/* USER CODE BEGIN Header_start_lwip_task */
|
||||||
|
@ -179,9 +179,9 @@ void start_ch438_task(void const *argument)
|
||||||
ch438_init();
|
ch438_init();
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
uint8_t data[5] = {0xFF, 0x34, 0x56, 0x78, 0x9a};
|
uint8_t data[9] = {0xFF, 0xff, 0xff, 0xff, 0xff, 0x34, 0x56, 0x78, 0x9a};
|
||||||
ch438_test();
|
ch438_test();
|
||||||
ch438_send_data(CH438_UART0, data, 5);
|
ch438_send_data(CH438_UART0, data, 9);
|
||||||
osDelay(1000);
|
osDelay(1000);
|
||||||
}
|
}
|
||||||
/* USER CODE END start_ch438_task */
|
/* USER CODE END start_ch438_task */
|
||||||
|
|
|
@ -61,7 +61,7 @@ void MX_FSMC_Init(void)
|
||||||
hsram1.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
|
hsram1.Init.WriteBurst = FSMC_WRITE_BURST_DISABLE;
|
||||||
hsram1.Init.PageSize = FSMC_PAGE_SIZE_NONE;
|
hsram1.Init.PageSize = FSMC_PAGE_SIZE_NONE;
|
||||||
/* Timing */
|
/* Timing */
|
||||||
Timing.AddressSetupTime = 15;
|
Timing.AddressSetupTime = 10;
|
||||||
Timing.AddressHoldTime = 15;
|
Timing.AddressHoldTime = 15;
|
||||||
Timing.DataSetupTime = 10;
|
Timing.DataSetupTime = 10;
|
||||||
Timing.BusTurnAroundDuration = 15;
|
Timing.BusTurnAroundDuration = 15;
|
||||||
|
@ -116,14 +116,12 @@ void MX_FSMC_Init(void)
|
||||||
|
|
||||||
static uint32_t FSMC_Initialized = 0;
|
static uint32_t FSMC_Initialized = 0;
|
||||||
|
|
||||||
static void HAL_FSMC_MspInit(void)
|
static void HAL_FSMC_MspInit(void){
|
||||||
{
|
|
||||||
/* USER CODE BEGIN FSMC_MspInit 0 */
|
/* USER CODE BEGIN FSMC_MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END FSMC_MspInit 0 */
|
/* USER CODE END FSMC_MspInit 0 */
|
||||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||||
if (FSMC_Initialized)
|
if (FSMC_Initialized) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FSMC_Initialized = 1;
|
FSMC_Initialized = 1;
|
||||||
|
@ -153,7 +151,8 @@ static void HAL_FSMC_MspInit(void)
|
||||||
PG9 ------> FSMC_NE2
|
PG9 ------> FSMC_NE2
|
||||||
*/
|
*/
|
||||||
/* GPIO_InitStruct */
|
/* GPIO_InitStruct */
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_12;
|
GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
||||||
|
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_12;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
@ -171,7 +170,8 @@ static void HAL_FSMC_MspInit(void)
|
||||||
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
|
||||||
|
|
||||||
/* GPIO_InitStruct */
|
/* GPIO_InitStruct */
|
||||||
GPIO_InitStruct.Pin = GPIO_PIN_14 | GPIO_PIN_15 | GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_7;
|
GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1
|
||||||
|
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_7;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
@ -193,8 +193,7 @@ static void HAL_FSMC_MspInit(void)
|
||||||
/* USER CODE END FSMC_MspInit 1 */
|
/* USER CODE END FSMC_MspInit 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_SRAM_MspInit(SRAM_HandleTypeDef *sramHandle)
|
void HAL_SRAM_MspInit(SRAM_HandleTypeDef* sramHandle){
|
||||||
{
|
|
||||||
/* USER CODE BEGIN SRAM_MspInit 0 */
|
/* USER CODE BEGIN SRAM_MspInit 0 */
|
||||||
|
|
||||||
/* USER CODE END SRAM_MspInit 0 */
|
/* USER CODE END SRAM_MspInit 0 */
|
||||||
|
@ -206,13 +205,11 @@ void HAL_SRAM_MspInit(SRAM_HandleTypeDef *sramHandle)
|
||||||
|
|
||||||
static uint32_t FSMC_DeInitialized = 0;
|
static uint32_t FSMC_DeInitialized = 0;
|
||||||
|
|
||||||
static void HAL_FSMC_MspDeInit(void)
|
static void HAL_FSMC_MspDeInit(void){
|
||||||
{
|
|
||||||
/* USER CODE BEGIN FSMC_MspDeInit 0 */
|
/* USER CODE BEGIN FSMC_MspDeInit 0 */
|
||||||
|
|
||||||
/* USER CODE END FSMC_MspDeInit 0 */
|
/* USER CODE END FSMC_MspDeInit 0 */
|
||||||
if (FSMC_DeInitialized)
|
if (FSMC_DeInitialized) {
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FSMC_DeInitialized = 1;
|
FSMC_DeInitialized = 1;
|
||||||
|
@ -241,11 +238,13 @@ static void HAL_FSMC_MspDeInit(void)
|
||||||
PG9 ------> FSMC_NE2
|
PG9 ------> FSMC_NE2
|
||||||
*/
|
*/
|
||||||
|
|
||||||
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_12);
|
HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
|
||||||
|
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_12);
|
||||||
|
|
||||||
HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10);
|
HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10);
|
||||||
|
|
||||||
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_14 | GPIO_PIN_15 | GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_7);
|
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1
|
||||||
|
|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_7);
|
||||||
|
|
||||||
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9);
|
HAL_GPIO_DeInit(GPIOG, GPIO_PIN_9);
|
||||||
|
|
||||||
|
@ -254,8 +253,7 @@ static void HAL_FSMC_MspDeInit(void)
|
||||||
/* USER CODE END FSMC_MspDeInit 1 */
|
/* USER CODE END FSMC_MspDeInit 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *sramHandle)
|
void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef* sramHandle){
|
||||||
{
|
|
||||||
/* USER CODE BEGIN SRAM_MspDeInit 0 */
|
/* USER CODE BEGIN SRAM_MspDeInit 0 */
|
||||||
|
|
||||||
/* USER CODE END SRAM_MspDeInit 0 */
|
/* USER CODE END SRAM_MspDeInit 0 */
|
||||||
|
|
|
@ -60,9 +60,15 @@ void MX_GPIO_Init(void)
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(HART_ALL_RST_GPIO_Port, HART_ALL_RST_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(HART_ALL_RST_GPIO_Port, HART_ALL_RST_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(CH438_1_AMOD_GPIO_Port, CH438_1_AMOD_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(HART1_RTS_GPIO_Port, HART1_RTS_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(HART1_RTS_GPIO_Port, HART1_RTS_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(CH438_1_RST_GPIO_Port, CH438_1_RST_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(DAC1_CS_GPIO_Port, DAC1_CS_Pin, GPIO_PIN_SET);
|
HAL_GPIO_WritePin(DAC1_CS_GPIO_Port, DAC1_CS_Pin, GPIO_PIN_SET);
|
||||||
|
|
||||||
|
@ -80,6 +86,13 @@ void MX_GPIO_Init(void)
|
||||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
HAL_GPIO_Init(HART_ALL_RST_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(HART_ALL_RST_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = CH438_1_AMOD_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_PULLDOWN;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(CH438_1_AMOD_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : PtPin */
|
/*Configure GPIO pin : PtPin */
|
||||||
GPIO_InitStruct.Pin = HART1_RTS_Pin;
|
GPIO_InitStruct.Pin = HART1_RTS_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
@ -93,6 +106,13 @@ void MX_GPIO_Init(void)
|
||||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
HAL_GPIO_Init(CH438_INT_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(CH438_INT_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = CH438_1_RST_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||||
|
HAL_GPIO_Init(CH438_1_RST_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : PtPin */
|
/*Configure GPIO pin : PtPin */
|
||||||
GPIO_InitStruct.Pin = DAC1_CS_Pin;
|
GPIO_InitStruct.Pin = DAC1_CS_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* USER CODE BEGIN Header */
|
/* USER CODE BEGIN Header */
|
||||||
/**
|
/**
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @file : main.c
|
* @file main.c
|
||||||
* @brief : Main program body
|
* @brief : Main program body
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* @attention
|
* @attention
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
/* Private includes ----------------------------------------------------------*/
|
/* Private includes ----------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN Includes */
|
/* USER CODE BEGIN Includes */
|
||||||
#include "ht1200m.h"
|
#include "ht1200m.h"
|
||||||
|
#include "ch438q.h"
|
||||||
/* USER CODE END Includes */
|
/* USER CODE END Includes */
|
||||||
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
|
@ -148,7 +149,8 @@ void SystemClock_Config(void)
|
||||||
|
|
||||||
/** Initializes the CPU, AHB and APB buses clocks
|
/** Initializes the CPU, AHB and APB buses clocks
|
||||||
*/
|
*/
|
||||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|
||||||
|
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
|
||||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
||||||
|
@ -161,7 +163,13 @@ void SystemClock_Config(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* USER CODE BEGIN 4 */
|
/* USER CODE BEGIN 4 */
|
||||||
|
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
|
||||||
|
{
|
||||||
|
if (CH438_INT_Pin == GPIO_Pin)
|
||||||
|
{
|
||||||
|
ch438_interrupt_handler();
|
||||||
|
}
|
||||||
|
}
|
||||||
/* USER CODE END 4 */
|
/* USER CODE END 4 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -177,8 +185,7 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||||
/* USER CODE BEGIN Callback 0 */
|
/* USER CODE BEGIN Callback 0 */
|
||||||
|
|
||||||
/* USER CODE END Callback 0 */
|
/* USER CODE END Callback 0 */
|
||||||
if (htim->Instance == TIM4)
|
if (htim->Instance == TIM4) {
|
||||||
{
|
|
||||||
HAL_IncTick();
|
HAL_IncTick();
|
||||||
}
|
}
|
||||||
/* USER CODE BEGIN Callback 1 */
|
/* USER CODE BEGIN Callback 1 */
|
||||||
|
|
|
@ -171,7 +171,7 @@ void EXTI2_IRQHandler(void)
|
||||||
/* USER CODE END EXTI2_IRQn 0 */
|
/* USER CODE END EXTI2_IRQn 0 */
|
||||||
HAL_GPIO_EXTI_IRQHandler(CH438_INT_Pin);
|
HAL_GPIO_EXTI_IRQHandler(CH438_INT_Pin);
|
||||||
/* USER CODE BEGIN EXTI2_IRQn 1 */
|
/* USER CODE BEGIN EXTI2_IRQn 1 */
|
||||||
ch438_interrupt_handler();
|
// ch438_interrupt_handler();
|
||||||
/* USER CODE END EXTI2_IRQn 1 */
|
/* USER CODE END EXTI2_IRQn 1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -148,24 +148,7 @@
|
||||||
<Name>-U090F00028316303030303032 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407ZGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
<Name>-U090F00028316303030303032 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -FF0STM32F4xx_1024.FLM -FS08000000 -FL0100000 -FP0($$Device:STM32F407ZGTx$CMSIS\Flash\STM32F4xx_1024.FLM)</Name>
|
||||||
</SetRegEntry>
|
</SetRegEntry>
|
||||||
</TargetDriverDllRegistry>
|
</TargetDriverDllRegistry>
|
||||||
<Breakpoint>
|
<Breakpoint/>
|
||||||
<Bp>
|
|
||||||
<Number>0</Number>
|
|
||||||
<Type>0</Type>
|
|
||||||
<LineNumber>184</LineNumber>
|
|
||||||
<EnabledFlag>1</EnabledFlag>
|
|
||||||
<Address>134258924</Address>
|
|
||||||
<ByteObject>0</ByteObject>
|
|
||||||
<HtxType>0</HtxType>
|
|
||||||
<ManyObjects>0</ManyObjects>
|
|
||||||
<SizeOfObject>0</SizeOfObject>
|
|
||||||
<BreakByAccess>0</BreakByAccess>
|
|
||||||
<BreakIfRCount>1</BreakIfRCount>
|
|
||||||
<Filename>../Core/Src/freertos.c</Filename>
|
|
||||||
<ExecCommand></ExecCommand>
|
|
||||||
<Expression>\\valve_debugging\../Core/Src/freertos.c\184</Expression>
|
|
||||||
</Bp>
|
|
||||||
</Breakpoint>
|
|
||||||
<WatchWindow1>
|
<WatchWindow1>
|
||||||
<Ww>
|
<Ww>
|
||||||
<count>0</count>
|
<count>0</count>
|
||||||
|
@ -276,7 +259,7 @@
|
||||||
<GroupNumber>2</GroupNumber>
|
<GroupNumber>2</GroupNumber>
|
||||||
<FileNumber>2</FileNumber>
|
<FileNumber>2</FileNumber>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<tvExp>0</tvExp>
|
<tvExp>1</tvExp>
|
||||||
<tvExpOptDlg>0</tvExpOptDlg>
|
<tvExpOptDlg>0</tvExpOptDlg>
|
||||||
<bDave2>0</bDave2>
|
<bDave2>0</bDave2>
|
||||||
<PathWithFileName>../Core/Src/main.c</PathWithFileName>
|
<PathWithFileName>../Core/Src/main.c</PathWithFileName>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +1,8 @@
|
||||||
#ifndef __CH438Q_H__
|
#ifndef __CH438Q_H__
|
||||||
#define __CH438Q_H__
|
#define __CH438Q_H__
|
||||||
|
|
||||||
#include "fsmc.h"
|
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
/* CH438串口寄存器地址 */
|
/* CH438串口寄存器地址 */
|
||||||
#define REG_RBR_ADDR 0x00 /* 串口0接收缓冲寄存器地址 */
|
#define REG_RBR_ADDR 0x00 /* 串口0接收缓冲寄存器地址 */
|
||||||
#define REG_THR_ADDR 0x00 /* 串口0发送保持寄存器地址 */
|
#define REG_THR_ADDR 0x00 /* 串口0发送保持寄存器地址 */
|
||||||
|
@ -134,4 +134,6 @@ void ch438_send_data(uint8_t uart_num, uint8_t *data, uint16_t len);
|
||||||
uint8_t ch438_recv_data(uint8_t uart_num, uint8_t *data);
|
uint8_t ch438_recv_data(uint8_t uart_num, uint8_t *data);
|
||||||
void ch438_interrupt_handler(void);
|
void ch438_interrupt_handler(void);
|
||||||
void ch438_init(void);
|
void ch438_init(void);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,41 +64,43 @@ Mcu.Pin14=PA7
|
||||||
Mcu.Pin15=PC4
|
Mcu.Pin15=PC4
|
||||||
Mcu.Pin16=PC5
|
Mcu.Pin16=PC5
|
||||||
Mcu.Pin17=PF12
|
Mcu.Pin17=PF12
|
||||||
Mcu.Pin18=PE7
|
Mcu.Pin18=PF14
|
||||||
Mcu.Pin19=PE8
|
Mcu.Pin19=PE7
|
||||||
Mcu.Pin2=PF1
|
Mcu.Pin2=PF1
|
||||||
Mcu.Pin20=PE9
|
Mcu.Pin20=PE8
|
||||||
Mcu.Pin21=PE10
|
Mcu.Pin21=PE9
|
||||||
Mcu.Pin22=PB11
|
Mcu.Pin22=PE10
|
||||||
Mcu.Pin23=PB12
|
Mcu.Pin23=PB11
|
||||||
Mcu.Pin24=PB13
|
Mcu.Pin24=PB12
|
||||||
Mcu.Pin25=PD14
|
Mcu.Pin25=PB13
|
||||||
Mcu.Pin26=PD15
|
Mcu.Pin26=PD14
|
||||||
Mcu.Pin27=PG4
|
Mcu.Pin27=PD15
|
||||||
Mcu.Pin28=PA13
|
Mcu.Pin28=PG4
|
||||||
Mcu.Pin29=PA14
|
Mcu.Pin29=PA13
|
||||||
Mcu.Pin3=PF2
|
Mcu.Pin3=PF2
|
||||||
Mcu.Pin30=PD0
|
Mcu.Pin30=PA14
|
||||||
Mcu.Pin31=PD1
|
Mcu.Pin31=PD0
|
||||||
Mcu.Pin32=PD2
|
Mcu.Pin32=PD1
|
||||||
Mcu.Pin33=PD4
|
Mcu.Pin33=PD2
|
||||||
Mcu.Pin34=PD5
|
Mcu.Pin34=PD3
|
||||||
Mcu.Pin35=PD7
|
Mcu.Pin35=PD4
|
||||||
Mcu.Pin36=PG9
|
Mcu.Pin36=PD5
|
||||||
Mcu.Pin37=PB3
|
Mcu.Pin37=PD7
|
||||||
Mcu.Pin38=PB4
|
Mcu.Pin38=PG9
|
||||||
Mcu.Pin39=PB5
|
Mcu.Pin39=PB3
|
||||||
Mcu.Pin4=PF3
|
Mcu.Pin4=PF3
|
||||||
Mcu.Pin40=PB6
|
Mcu.Pin40=PB4
|
||||||
Mcu.Pin41=VP_FREERTOS_VS_CMSIS_V1
|
Mcu.Pin41=PB5
|
||||||
Mcu.Pin42=VP_LWIP_VS_Enabled
|
Mcu.Pin42=PB6
|
||||||
Mcu.Pin43=VP_SYS_VS_tim4
|
Mcu.Pin43=VP_FREERTOS_VS_CMSIS_V1
|
||||||
|
Mcu.Pin44=VP_LWIP_VS_Enabled
|
||||||
|
Mcu.Pin45=VP_SYS_VS_tim4
|
||||||
Mcu.Pin5=PF4
|
Mcu.Pin5=PF4
|
||||||
Mcu.Pin6=PF5
|
Mcu.Pin6=PF5
|
||||||
Mcu.Pin7=PH0-OSC_IN
|
Mcu.Pin7=PH0-OSC_IN
|
||||||
Mcu.Pin8=PH1-OSC_OUT
|
Mcu.Pin8=PH1-OSC_OUT
|
||||||
Mcu.Pin9=PC1
|
Mcu.Pin9=PC1
|
||||||
Mcu.PinsNb=44
|
Mcu.PinsNb=46
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=
|
Mcu.UserConstants=
|
||||||
Mcu.UserName=STM32F407ZGTx
|
Mcu.UserName=STM32F407ZGTx
|
||||||
|
@ -183,6 +185,13 @@ PD2.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING
|
||||||
PD2.GPIO_PuPd=GPIO_PULLUP
|
PD2.GPIO_PuPd=GPIO_PULLUP
|
||||||
PD2.Locked=true
|
PD2.Locked=true
|
||||||
PD2.Signal=GPXTI2
|
PD2.Signal=GPXTI2
|
||||||
|
PD3.GPIOParameters=GPIO_Speed,PinState,GPIO_PuPd,GPIO_Label
|
||||||
|
PD3.GPIO_Label=CH438_1_RST
|
||||||
|
PD3.GPIO_PuPd=GPIO_PULLUP
|
||||||
|
PD3.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
|
||||||
|
PD3.Locked=true
|
||||||
|
PD3.PinState=GPIO_PIN_SET
|
||||||
|
PD3.Signal=GPIO_Output
|
||||||
PD4.Signal=FSMC_NOE
|
PD4.Signal=FSMC_NOE
|
||||||
PD5.Signal=FSMC_NWE
|
PD5.Signal=FSMC_NWE
|
||||||
PD7.Mode=NorPsramChipSelect1_1
|
PD7.Mode=NorPsramChipSelect1_1
|
||||||
|
@ -201,6 +210,13 @@ PE9.Signal=FSMC_D6_DA6
|
||||||
PF0.Signal=FSMC_A0
|
PF0.Signal=FSMC_A0
|
||||||
PF1.Signal=FSMC_A1
|
PF1.Signal=FSMC_A1
|
||||||
PF12.Signal=FSMC_A6
|
PF12.Signal=FSMC_A6
|
||||||
|
PF14.GPIOParameters=GPIO_Speed,PinState,GPIO_PuPd,GPIO_Label
|
||||||
|
PF14.GPIO_Label=CH438_1_AMOD
|
||||||
|
PF14.GPIO_PuPd=GPIO_PULLDOWN
|
||||||
|
PF14.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
|
||||||
|
PF14.Locked=true
|
||||||
|
PF14.PinState=GPIO_PIN_RESET
|
||||||
|
PF14.Signal=GPIO_Output
|
||||||
PF2.Signal=FSMC_A2
|
PF2.Signal=FSMC_A2
|
||||||
PF3.Signal=FSMC_A3
|
PF3.Signal=FSMC_A3
|
||||||
PF4.Signal=FSMC_A4
|
PF4.Signal=FSMC_A4
|
||||||
|
|
Loading…
Reference in New Issue