guanjiao
2018-08-29 0e4f298824b83e1a1e81ec8ced2e6c007a1c8961
1. 修改为外部晶振
2. 修改led与蜂鸣器pin角
已修改5个文件
52 ■■■■■ 文件已修改
源码/核心板/MDK-ARM/Project.uvoptx 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/MDK-ARM/Project.uvprojx 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/ExternalDevices/beep.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/ExternalDevices/led.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
源码/核心板/Src/main.c 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Ô´Âë/ºËÐİå/MDK-ARM/Project.uvoptx
@@ -77,7 +77,7 @@
        <tvExpOptDlg>0</tvExpOptDlg>
        <IsCurrentTarget>1</IsCurrentTarget>
      </OPTFL>
      <CpuCode>18</CpuCode>
      <CpuCode>255</CpuCode>
      <DebugOpt>
        <uSim>0</uSim>
        <uTrg>1</uTrg>
@@ -117,7 +117,8 @@
      <TargetDriverDllRegistry>
        <SetRegEntry>
          <Number>0</Number>
          <Key>DLGUARM</Key>
          <Key>UL2CM3</Key>
          <Name>-UV0010M9E -O2254 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7  -FN1 -FC1000 -FD20000000 -FF0STM32F10x_128 -FL020000 -FS08000000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM)</Name>
        </SetRegEntry>
        <SetRegEntry>
          <Number>0</Number>
@@ -126,8 +127,8 @@
        </SetRegEntry>
        <SetRegEntry>
          <Number>0</Number>
          <Key>UL2CM3</Key>
          <Name>-UV0010M9E -O2254 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(1BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7  -FN1 -FC1000 -FD20000000 -FF0STM32F10x_128 -FL020000 -FS08000000 -FP0($$Device:STM32F103T8$Flash\STM32F10x_128.FLM)</Name>
          <Key>DLGUARM</Key>
          <Name>?</Name>
        </SetRegEntry>
        <SetRegEntry>
          <Number>0</Number>
@@ -142,7 +143,7 @@
        <SetRegEntry>
          <Number>0</Number>
          <Key>DLGTARM</Key>
          <Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=767,133,1188,538,0)(121=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
          <Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(1011=-1,-1,-1,-1,0)(180=-1,-1,-1,-1,0)(120=767,133,1188,538,0)(121=-1,-1,-1,-1,0)(122=-1,-1,-1,-1,0)(123=-1,-1,-1,-1,0)(140=-1,-1,-1,-1,0)(240=-1,-1,-1,-1,0)(190=-1,-1,-1,-1,0)(200=-1,-1,-1,-1,0)(170=-1,-1,-1,-1,0)(130=-1,-1,-1,-1,0)(131=-1,-1,-1,-1,0)(132=-1,-1,-1,-1,0)(133=-1,-1,-1,-1,0)(160=-1,-1,-1,-1,0)(161=-1,-1,-1,-1,0)(162=-1,-1,-1,-1,0)(210=-1,-1,-1,-1,0)(211=-1,-1,-1,-1,0)(220=-1,-1,-1,-1,0)(221=-1,-1,-1,-1,0)(230=-1,-1,-1,-1,0)(231=-1,-1,-1,-1,0)(232=-1,-1,-1,-1,0)(233=-1,-1,-1,-1,0)(150=-1,-1,-1,-1,0)(151=-1,-1,-1,-1,0)</Name>
        </SetRegEntry>
        <SetRegEntry>
          <Number>0</Number>
@@ -172,6 +173,16 @@
          <WinNumber>1</WinNumber>
          <ItemText>dis_after_filter</ItemText>
        </Ww>
        <Ww>
          <count>4</count>
          <WinNumber>1</WinNumber>
          <ItemText>g_beep_off_time,0x0A</ItemText>
        </Ww>
        <Ww>
          <count>5</count>
          <WinNumber>1</WinNumber>
          <ItemText>status_reg</ItemText>
        </Ww>
      </WatchWindow1>
      <MemoryWindow1>
        <Mm>
@@ -195,7 +206,7 @@
      <DebugFlag>
        <trace>0</trace>
        <periodic>1</periodic>
        <aLwin>1</aLwin>
        <aLwin>0</aLwin>
        <aCover>0</aCover>
        <aSer1>0</aSer1>
        <aSer2>0</aSer2>
Ô´Âë/ºËÐİå/MDK-ARM/Project.uvprojx
@@ -13,16 +13,16 @@
      <pCCUsed>5060422::V5.06 update 4 (build 422)::ARMCC</pCCUsed>
      <TargetOption>
        <TargetCommonOption>
          <Device>STM32F103T8</Device>
          <Device>STM32F103C8</Device>
          <Vendor>STMicroelectronics</Vendor>
          <PackID>Keil.STM32F1xx_DFP.2.1.0</PackID>
          <PackURL>http://www.keil.com/pack/</PackURL>
          <Cpu>IRAM(0x20000000,0x5000) IROM(0x08000000,0x10000) CPUTYPE("Cortex-M3") CLOCK(12000000) ELITTLE</Cpu>
          <FlashUtilSpec></FlashUtilSpec>
          <StartupFile></StartupFile>
          <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103T8$Flash\STM32F10x_128.FLM))</FlashDriverDll>
          <DeviceId>4403</DeviceId>
          <RegisterFile>$$Device:STM32F103T8$Device\Include\stm32f10x.h</RegisterFile>
          <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F10x_128 -FS08000000 -FL020000 -FP0($$Device:STM32F103C8$Flash\STM32F10x_128.FLM))</FlashDriverDll>
          <DeviceId>4235</DeviceId>
          <RegisterFile>$$Device:STM32F103C8$Device\Include\stm32f10x.h</RegisterFile>
          <MemoryEnv></MemoryEnv>
          <Cmp></Cmp>
          <Asm></Asm>
@@ -32,7 +32,7 @@
          <SLE66CMisc></SLE66CMisc>
          <SLE66AMisc></SLE66AMisc>
          <SLE66LinkerMisc></SLE66LinkerMisc>
          <SFDFile>$$Device:STM32F103T8$SVD\STM32F103xx.svd</SFDFile>
          <SFDFile>$$Device:STM32F103C8$SVD\STM32F103xx.svd</SFDFile>
          <bCustSvd>0</bCustSvd>
          <UseEnv>0</UseEnv>
          <BinPath></BinPath>
@@ -111,11 +111,11 @@
          <SimDllName>SARMCM3.DLL</SimDllName>
          <SimDllArguments></SimDllArguments>
          <SimDlgDll>DARMSTM.DLL</SimDlgDll>
          <SimDlgDllArguments>-pSTM32F103T8</SimDlgDllArguments>
          <SimDlgDllArguments>-pSTM32F103C8</SimDlgDllArguments>
          <TargetDllName>SARMCM3.DLL</TargetDllName>
          <TargetDllArguments></TargetDllArguments>
          <TargetDlgDll>TARMSTM.DLL</TargetDlgDll>
          <TargetDlgDllArguments>-pSTM32F103T8</TargetDlgDllArguments>
          <TargetDlgDllArguments>-pSTM32F103C8</TargetDlgDllArguments>
        </DllOption>
        <DebugOption>
          <OPTHX>
@@ -137,7 +137,7 @@
          </Flash1>
          <bUseTDR>1</bUseTDR>
          <Flash2>BIN\UL2CM3.DLL</Flash2>
          <Flash3>"" ()</Flash3>
          <Flash3></Flash3>
          <Flash4></Flash4>
          <pFcarmOut></pFcarmOut>
          <pFcarmGrp></pFcarmGrp>
Ô´Âë/ºËÐİå/Src/ExternalDevices/beep.h
@@ -4,8 +4,8 @@
#include "stm32f10x.h"
#define BEEP_PIN                    GPIO_Pin_0
#define BEEP2_PIN                    GPIO_Pin_11
#define BEEP_PIN                    GPIO_Pin_2
#define BEEP2_PIN                    GPIO_Pin_5
#define BEEP_GPIO                    GPIOA
#define BEEP_ON                        GPIO_WriteBit(BEEP_GPIO, BEEP_PIN, Bit_SET)
#define BEEP_OFF                    GPIO_WriteBit(BEEP_GPIO, BEEP_PIN, Bit_RESET)
Ô´Âë/ºËÐİå/Src/ExternalDevices/led.h
@@ -4,7 +4,7 @@
#include "stm32f10x.h"
#define LED0_PIN                    GPIO_Pin_8
#define LED0_PIN                    GPIO_Pin_2
#define LED0_GPIO                    GPIOA
#define LED_BLINK(...)                GPIO_Toggle(__VA_ARGS__)
#define LED0_BLINK                    LED_BLINK(LED0_GPIO, LED0_PIN)
Ô´Âë/ºËÐİå/Src/main.c
@@ -18,7 +18,8 @@
void Device_Init(void)
{
    Rcc_Init();
//    Rcc_Init();
    SystemInit();
    Nvic_Init();
    Systick_Init();
    Led_Init();
@@ -60,7 +61,9 @@
        
        if(dis_after_filter <= START_ALARM_DIST_CM)
        {
            g_beep_off_time = (uint32_t)dis_after_filter * 10 - 1000;
            g_beep_off_time = (uint32_t)dis_after_filter * 10;
            if(g_beep_off_time <= 0)
                g_beep_off_time = 0;
            g_beep_on_time = BEEM_ON_TIME_MS; 
        }
        else