Browse Source

实现串口初始化配置

div1
QQyyblithe 2 years ago
parent
commit
56fd63b5ca
11 changed files with 333 additions and 161 deletions
  1. +5
    -5
      IAR/settings/test01.dbgdt
  2. +11
    -11
      IAR/settings/test01.dnx
  3. +20
    -19
      IAR/settings/test01.wsdt
  4. +187
    -120
      IAR/test01.dep
  5. +9
    -0
      IAR/test01.ewp
  6. +9
    -0
      IAR/test01.ewt
  7. +2
    -2
      user/main.c
  8. +20
    -2
      user/pin_Init.c
  9. +6
    -2
      user/pin_Init.h
  10. +50
    -0
      user/uart_Interrupt.c
  11. +14
    -0
      user/uart_Interrupt.h

+ 5
- 5
IAR/settings/test01.dbgdt View File

@@ -156,11 +156,11 @@
<RecentlyUsedMenus>1</RecentlyUsedMenus>
<MenuShadows>1</MenuShadows>
<ShowAllMenusAfterDelay>1</ShowAllMenusAfterDelay>
<CommandsUsage>020100001200108600000E0000001D810000010000000C8100003300000017810000010000005686000069000000558400000100000000810000010000000E810000340000000B81000001000000148600000700000002840000010000002781000002000000118600000C00000005810000020000004681000018000000108400000500000008860000010000005D86000001000000</CommandsUsage>
<CommandsUsage>33010000120010860000160000001D810000010000000C8100003300000017810000010000005686000083000000558400000100000000810000010000000E810000340000000B81000001000000148600000700000002840000010000002781000002000000118600000C00000005810000020000004681000027000000108400000500000008860000010000005D86000001000000</CommandsUsage>
</MFCToolBarParameters>
<CommandManager>
<CommandsWithoutImages>0B000D8400000F84000008840000FFFFFFFF54840000328100001C81000009840000838600005886000004DC0000</CommandsWithoutImages>
<MenuUserImages>1600578600001C00000023920000000000000A8600002D0000009A8600001A000000008400007A00000030840000840000000E840000820000001A86000034000000098600002C0000000B810000510000008E8600003D000000698600003A00000055860000080000000E8600001B0000000B8600002E0000000D81000053000000A18600003E000000C386000004000000088600002B0000003787000003000000C08600000E0000001686000033000000</MenuUserImages>
<MenuUserImages>1600578600001C00000023920000000000000A8600002D0000009A8600001A000000008400007A0000000E840000820000003084000084000000098600002C0000001A860000340000008E8600003D0000000B81000051000000698600003A00000055860000080000000E8600001B0000000B8600002E000000088600002B000000C386000004000000A18600003E0000000D810000530000001686000033000000C08600000E0000003787000003000000</MenuUserImages>
</CommandManager>
<Pane-59393>
<ID>0</ID>
@@ -1063,7 +1063,7 @@
</BasePane-34048>
<MFCToolBar-34049>
<Name>Debug</Name>
<Buttons>00200000010000000800FFFF01001100434D4643546F6F6C426172427574746F6E568600000000040035000000FFFEFF0000000000000000000000000001000000010000000180138600000000040031000000FFFEFF00000000000000000000000000010000000100000001805E8600000000040037000000FFFEFF0000000000000000000000000001000000010000000180608600000000040039000000FFFEFF00000000000000000000000000010000000100000001805D8600000000040036000000FFFEFF000000000000000000000000000100000001000000018010860000000004002F000000FFFEFF0000000000000000000000000001000000010000000180118600000000000030000000FFFEFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E148600000000040032000000FFFEFF205200650073006500740020007400680065002000640065006200750067006700650064002000700072006F006700720061006D000A00520065007300650074000000000000000000000000000100000001000000000000000000000001000000020009800000000000000400FFFFFFFFFFFEFF000000000000000000000000000100000001000000000000000000000001000000000009801986000000000000FFFFFFFFFFFEFF000100000000000000000000000100000001000000000000000000000001000000000000000000FFFEFF0544006500620075006700C6000000</Buttons>
<Buttons>00200000010000000800FFFF01001100434D4643546F6F6C426172427574746F6E568600000000000035000000FFFEFF0000000000000000000000000001000000010000000180138600000000000031000000FFFEFF00000000000000000000000000010000000100000001805E8600000000000037000000FFFEFF0000000000000000000000000001000000010000000180608600000000000039000000FFFEFF00000000000000000000000000010000000100000001805D8600000000000036000000FFFEFF000000000000000000000000000100000001000000018010860000000000002F000000FFFEFF0000000000000000000000000001000000010000000180118600000000040030000000FFFEFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E148600000000000032000000FFFEFF205200650073006500740020007400680065002000640065006200750067006700650064002000700072006F006700720061006D000A00520065007300650074000000000000000000000000000100000001000000000000000000000001000000020009800000000000000400FFFFFFFFFFFEFF000000000000000000000000000100000001000000000000000000000001000000000009801986000000000000FFFFFFFFFFFEFF000100000000000000000000000100000001000000000000000000000001000000000000000000FFFEFF0544006500620075006700C6000000</Buttons>
</MFCToolBar-34049>
<Pane-34049>
<ID>34049</ID>
@@ -1080,7 +1080,7 @@
</BasePane-34049>
<MFCToolBar-34050>
<Name>Trace</Name>
<Buttons>00200000010000000200FFFF01001100434D4643546F6F6C426172427574746F6E53920000000004008A000000FFFEFF03450054004D0000000000000000000000000001000000010000000180549200000000000025000000FFFEFF03530057004F00000000000000000000000000010000000100000000000000FFFEFF05540072006100630065002F000000</Buttons>
<Buttons>00200000010000000200FFFF01001100434D4643546F6F6C426172427574746F6E539200000000040089000000FFFEFF03450054004D0000000000000000000000000001000000010000000180549200000000000025000000FFFEFF03530057004F00000000000000000000000000010000000100000000000000FFFEFF05540072006100630065002F000000</Buttons>
</MFCToolBar-34050>
<Pane-34050>
<ID>34050</ID>
@@ -1097,7 +1097,7 @@
</BasePane-34050>
<MFCToolBar-34051>
<Name>Main</Name>
<Buttons>00200000010000002100FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000067000000FFFEFF000000000000000000000000000100000001000000018001E100000000000068000000FFFEFF000000000000000000000000000100000001000000018003E10000000000006A000000FFFEFF000000000000000000000000000100000001000000018000810000000000004B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E10000000000006D000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E10000000004006F000000FFFEFF000000000000000000000000000100000001000000018022E10000000004006E000000FFFEFF000000000000000000000000000100000001000000018025E100000000000071000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE100000000000074000000FFFEFF00000000000000000000000000010000000100000001802CE100000000040075000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6E4281000000000000FFFFFFFFFFFEFF0000000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000000018021810000000004005E000000FFFEFF000000000000000000000000000100000001000000018024E100000000000070000000FFFEFF000000000000000000000000000100000001000000018028E100000000040072000000FFFEFF000000000000000000000000000100000001000000018029E100000000000073000000FFFEFF000000000000000000000000000100000001000000018002810000000000004D000000FFFEFF0000000000000000000000000001000000010000000180298100000000000062000000FFFEFF0000000000000000000000000001000000010000000180278100000000000060000000FFFEFF0000000000000000000000000001000000010000000180288100000000000061000000FFFEFF00000000000000000000000000010000000100000001801D810000000000005A000000FFFEFF00000000000000000000000000010000000100000001801E810000000004005B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000000000051000000FFFEFF00000000000000000000000000010000000100000001800C8100000000000052000000FFFEFF00000000000000000000000000010000000100000001805F8600000000000066000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001801F810000000000005C000000FFFEFF000000000000000000000000000100000001000000018020810000000000005D000000FFFEFF0000000000000000000000000001000000010000000180468100000000020064000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00FF020000</Buttons>
<Buttons>00200000010000002100FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000067000000FFFEFF000000000000000000000000000100000001000000018001E100000000000068000000FFFEFF000000000000000000000000000100000001000000018003E10000000000006A000000FFFEFF000000000000000000000000000100000001000000018000810000000000004B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018007E10000000000006D000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000018023E10000000004006F000000FFFEFF000000000000000000000000000100000001000000018022E10000000004006E000000FFFEFF000000000000000000000000000100000001000000018025E100000000000071000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001802BE100000000000074000000FFFEFF00000000000000000000000000010000000100000001802CE100000000040075000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6E4281000000000000FFFFFFFFFFFEFF0001000000000000000100000000000000010000007800000002002050FFFFFFFFFFFEFF0096000000000000000000018021810000000004005E000000FFFEFF000000000000000000000000000100000001000000018024E100000000000070000000FFFEFF000000000000000000000000000100000001000000018028E100000000040072000000FFFEFF000000000000000000000000000100000001000000018029E100000000000073000000FFFEFF000000000000000000000000000100000001000000018002810000000000004D000000FFFEFF0000000000000000000000000001000000010000000180298100000000000062000000FFFEFF0000000000000000000000000001000000010000000180278100000000000060000000FFFEFF0000000000000000000000000001000000010000000180288100000000000061000000FFFEFF00000000000000000000000000010000000100000001801D810000000000005A000000FFFEFF00000000000000000000000000010000000100000001801E810000000004005B000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001800B8100000000040051000000FFFEFF00000000000000000000000000010000000100000001800C8100000000000052000000FFFEFF00000000000000000000000000010000000100000001805F8600000000000066000000FFFEFF00000000000000000000000000010000000100000001800000000001000000FFFFFFFFFFFEFF00000000000000000000000000010000000100000001801F810000000000005C000000FFFEFF000000000000000000000000000100000001000000018020810000000000005D000000FFFEFF0000000000000000000000000001000000010000000180468100000000020064000000FFFEFF00000000000000000000000000010000000100000000000000FFFEFF044D00610069006E00FF020000</Buttons>
</MFCToolBar-34051>
<Pane-34051>
<ID>34051</ID>


+ 11
- 11
IAR/settings/test01.dnx View File

@@ -35,7 +35,7 @@
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
</JLinkDriver>
<DebugChecksum>
<Checksum>2701884870</Checksum>
<Checksum>2166995177</Checksum>
</DebugChecksum>
<Exceptions>
<StopOnUncaught>_ 0</StopOnUncaught>
@@ -125,12 +125,6 @@
<ShowTimeSum>1</ShowTimeSum>
<SumSortOrder>0</SumSortOrder>
</EventLog>
<DisassembleMode>
<mode>0</mode>
</DisassembleMode>
<Breakpoints2>
<Count>0</Count>
</Breakpoints2>
<TermIOLog>
<LoggingEnabled>_ 0</LoggingEnabled>
<LogFile>_ ""</LogFile>
@@ -140,10 +134,6 @@
<LogFile>_ ""</LogFile>
<Category>_ 0</Category>
</LogFile>
<Aliases>
<Count>0</Count>
<SuppressDialog>0</SuppressDialog>
</Aliases>
<DriverProfiling>
<Enabled>0</Enabled>
<Mode>3</Mode>
@@ -162,4 +152,14 @@
<Probe0>I0</Probe0>
<ProbeSetup0>2 1 1 2 0 0</ProbeSetup0>
</PowerProbe>
<DisassembleMode>
<mode>0</mode>
</DisassembleMode>
<Breakpoints2>
<Count>0</Count>
</Breakpoints2>
<Aliases>
<Count>0</Count>
<SuppressDialog>0</SuppressDialog>
</Aliases>
</settings>

+ 20
- 19
IAR/settings/test01.wsdt
File diff suppressed because it is too large
View File


+ 187
- 120
IAR/test01.dep View File

@@ -1,240 +1,295 @@
<?xml version="1.0" encoding="UTF-8"?>
<project>
<fileVersion>4</fileVersion>
<fileChecksum>516634060</fileChecksum>
<fileChecksum>1415475508</fileChecksum>
<configuration>
<name>Debug</name>
<outputs>
<file>$PROJ_DIR$\..\drivers\fsl_common.c</file>
<file>$PROJ_DIR$\..\drivers\fsl_gpio.c</file>
<file>$PROJ_DIR$\..\drivers\fsl_clock.c</file>
<file>$PROJ_DIR$\..\Include\mpu_armv7.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.__cstat.et</file>
<file>$PROJ_DIR$\..\drivers\fsl_common.h</file>
<file>$PROJ_DIR$\..\utilities\debug_console\fsl_debug_console_conf.h</file>
<file>$PROJ_DIR$\..\startup\startup_MKV56F24.s</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_debug_console.xcl</file>
<file>$PROJ_DIR$\..\utilities\fsl_assert.c</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_float_setup.h</file>
<file>$PROJ_DIR$\..\drivers\fsl_port.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.o</file>
<file>$TOOLKIT_DIR$\inc\c\stdarg.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.xcl</file>
<file>$PROJ_DIR$\..\startup\MKV56F24.h</file>
<file>$TOOLKIT_DIR$\inc\c\math.h</file>
<file>$PROJ_DIR$\..\user\main.c</file>
<file>$PROJ_DIR$\..\startup\startup_MKV56F24.s</file>
<file>$PROJ_DIR$\..\startup\system_MKV56F24.c</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_common.o</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Defaults.h</file>
<file>$PROJ_DIR$\..\drivers\fsl_clock.h</file>
<file>$PROJ_DIR$\..\utilities\str\fsl_str.c</file>
<file>$TOOLKIT_DIR$\lib\shb_l.a</file>
<file>$TOOLKIT_DIR$\lib\dl7M_tln.a</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.xcl</file>
<file>$TOOLKIT_DIR$\inc\c\stdint.h</file>
<file>$PROJ_DIR$\..\drivers\fsl_gpio.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\main.o</file>
<file>$TOOLKIT_DIR$\inc\c\stdbool.h</file>
<file>$PROJ_DIR$\..\utilities\str\fsl_str.h</file>
<file>$PROJ_DIR$\..\Include\cmsis_compiler.h</file>
<file>$PROJ_DIR$\..\utilities\debug_console\fsl_debug_console.c</file>
<file>$TOOLKIT_DIR$\inc\c\stdlib.h</file>
<file>$PROJ_DIR$\..\startup\system_MKV56F24.h</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.xcl</file>
<file>$TOOLKIT_DIR$\inc\c\assert.h</file>
<file>$PROJ_DIR$\..\startup\MKV56F24_features.h</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Product_stdlib.h</file>
<file>$PROJ_DIR$\..\startup\fsl_device_registers.h</file>
<file>$PROJ_DIR$\..\Include\cmsis_iccarm.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_clock.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\startup_MKV56F24.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.o</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.xcl</file>
<file>$PROJ_DIR$\Debug\List\test01.map</file>
<file>$PROJ_DIR$\Debug\Exe\test01.out</file>
<file>$PROJ_DIR$\..\Include\cmsis_version.h</file>
<file>$TOOLKIT_DIR$\inc\c\ycheck.h</file>
<file>$PROJ_DIR$\..\user\delay.c</file>
<file>$PROJ_DIR$\..\Include\mpu_armv7.h</file>
<file>$PROJ_DIR$\..\user\main.c</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.__cstat.et</file>
<file>$PROJ_DIR$\..\drivers\fsl_common.h</file>
<file>$PROJ_DIR$\..\user\pin_Init.c</file>
<file>$PROJ_DIR$\..\drivers\fsl_gpio.c</file>
<file>$PROJ_DIR$\..\drivers\fsl_clock.c</file>
<file>$PROJ_DIR$\..\drivers\fsl_common.c</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_common.__cstat.et</file>
<file>$TOOLKIT_DIR$\inc\c\ysizet.h</file>
<file>$PROJ_DIR$\..\Include\core_cm7.h</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Product_string.h</file>
<file>$TOOLKIT_DIR$\inc\c\iccarm_builtin.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_common.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_clock.o</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Product.h</file>
<file>$TOOLKIT_DIR$\lib\m7M_tls.a</file>
<file>$PROJ_DIR$\Debug\Exe\test01.out</file>
<file>$PROJ_DIR$\..\Include\cmsis_version.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_clock.xcl</file>
<file>$PROJ_DIR$\Debug\List\test01.map</file>
<file>$TOOLKIT_DIR$\inc\c\string.h</file>
<file>$PROJ_DIR$\..\Include\core_cm7.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\test01.pbd</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.__cstat.et</file>
<file>$TOOLKIT_DIR$\inc\c\stddef.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_common.__cstat.et</file>
<file>$TOOLKIT_DIR$\inc\c\iccarm_builtin.h</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Product_string.h</file>
<file>$TOOLKIT_DIR$\inc\c\yvals.h</file>
<file>$TOOLKIT_DIR$\lib\rt7M_tl.a</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Config_Normal.h</file>
<file>$TOOLKIT_DIR$\config\linker\NXP\MKV5xF512xxx24.icf</file>
<file>$PROJ_DIR$\..\user\delay.c</file>
<file>$PROJ_DIR$\..\user\delay.h</file>
<file>$PROJ_DIR$\Debug\Obj\delay.o</file>
<file>$PROJ_DIR$\Debug\Obj\delay.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\pin_Init.o</file>
<file>$PROJ_DIR$\..\startup\fsl_device_registers.h</file>
<file>$TOOLKIT_DIR$\lib\m7M_tls.a</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Config_Normal.h</file>
<file>$TOOLKIT_DIR$\inc\c\ycheck.h</file>
<file>$PROJ_DIR$\Debug\Obj\test01.pbd</file>
<file>$PROJ_DIR$\..\Include\cmsis_iccarm.h</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Product_stdlib.h</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\startup_MKV56F24.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_clock.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.xcl</file>
<file>$PROJ_DIR$\..\Include\cmsis_compiler.h</file>
<file>$TOOLKIT_DIR$\inc\c\stdlib.h</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\system_MKV56F24.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\main.o</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_float_setup.h</file>
<file>$PROJ_DIR$\..\utilities\str\fsl_str.c</file>
<file>$TOOLKIT_DIR$\inc\c\assert.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.__cstat.et</file>
<file>$PROJ_DIR$\..\utilities\str\fsl_str.h</file>
<file>$PROJ_DIR$\..\drivers\fsl_gpio.h</file>
<file>$PROJ_DIR$\..\utilities\debug_console\fsl_debug_console.c</file>
<file>$PROJ_DIR$\..\startup\system_MKV56F24.h</file>
<file>$PROJ_DIR$\..\utilities\debug_console\fsl_debug_console_conf.h</file>
<file>$PROJ_DIR$\..\utilities\fsl_assert.c</file>
<file>$TOOLKIT_DIR$\inc\c\math.h</file>
<file>$PROJ_DIR$\..\startup\MKV56F24_features.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_gpio.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_str.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_debug_console.xcl</file>
<file>$TOOLKIT_DIR$\lib\shb_l.a</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_common.o</file>
<file>$TOOLKIT_DIR$\inc\c\stdint.h</file>
<file>$PROJ_DIR$\..\drivers\fsl_clock.h</file>
<file>$TOOLKIT_DIR$\inc\c\stdarg.h</file>
<file>$TOOLKIT_DIR$\inc\c\DLib_Defaults.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_assert.o</file>
<file>$TOOLKIT_DIR$\lib\dl7M_tln.a</file>
<file>$TOOLKIT_DIR$\inc\c\stdbool.h</file>
<file>$PROJ_DIR$\Debug\Obj\pin_Init.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\pin_Init.o</file>
<file>$PROJ_DIR$\..\user\pin_Init.h</file>
<file>$PROJ_DIR$\..\user\pin_Init.c</file>
<file>$PROJ_DIR$\Debug\Obj\delay.xcl</file>
<file>$PROJ_DIR$\..\drivers\fsl_uart.h</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_uart.o</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_uart.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\uart_Interrupt.xcl</file>
<file>$PROJ_DIR$\Debug\Obj\uart_Interrupt.o</file>
<file>$PROJ_DIR$\..\drivers\fsl_uart.c</file>
<file>$PROJ_DIR$\..\user\uart_Interrupt.c</file>
<file>$PROJ_DIR$\..\user\uart_Interrupt.h</file>
<file>$PROJ_DIR$\Debug\Obj\delay.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_uart.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\fsl_clock.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\pin_Init.__cstat.et</file>
<file>$PROJ_DIR$\Debug\Obj\uart_Interrupt.__cstat.et</file>
</outputs>
<file>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 51 50</file>
<file> 20 23</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\drivers\fsl_common.c</name>
<name>$PROJ_DIR$\..\startup\startup_MKV56F24.s</name>
<outputs>
<tool>
<name>AARM</name>
<file> 42</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\startup\system_MKV56F24.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 21</file>
<file> 40</file>
</tool>
<tool>
<name>__cstat</name>
<file> 65</file>
<file> 48</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 55</file>
<file> 49</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23</file>
<file> 69 36 28 72 35 19 33 1 15 21 46 38 17 5 59 63</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\drivers\fsl_gpio.c</name>
<name>$PROJ_DIR$\..\user\delay.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 47</file>
<file> 32</file>
</tool>
<tool>
<name>__cstat</name>
<file> 63</file>
<file> 88</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 27</file>
<file> 79</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 29 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23</file>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70 31</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\drivers\fsl_clock.c</name>
<name>$PROJ_DIR$\..\user\main.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 56</file>
<file> 51</file>
</tool>
<tool>
<name>__cstat</name>
<file> 26</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 45</file>
<file> 43</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 23 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41</file>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70 57 78 31 87</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\startup\startup_MKV56F24.s</name>
<name>$PROJ_DIR$\..\user\pin_Init.c</name>
<outputs>
<tool>
<name>AARM</name>
<file> 46</file>
<name>ICCARM</name>
<file> 77</file>
</tool>
<tool>
<name>__cstat</name>
<file> 91</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 76</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70 0 57 78 80</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\utilities\fsl_assert.c</name>
<name>$PROJ_DIR$\..\drivers\fsl_gpio.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 13</file>
<file> 25</file>
</tool>
<tool>
<name>__cstat</name>
<file> 4</file>
<file> 41</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 16</file>
<file> 64</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23</file>
<file> 57 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\user\main.c</name>
<name>$PROJ_DIR$\..\drivers\fsl_clock.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 31</file>
<file> 44</file>
</tool>
<tool>
<name>__cstat</name>
<file> 61</file>
<file> 90</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 49</file>
<file> 22</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23 29 78 73</file>
<file> 70 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\startup\system_MKV56F24.c</name>
<name>$PROJ_DIR$\..\drivers\fsl_common.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 48</file>
<file> 68</file>
</tool>
<tool>
<name>__cstat</name>
<file> 38</file>
<file> 13</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 39</file>
<file> 18</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 28 53 68 22 70 57 43 17 60 52 34 44 66 3 37 41</file>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Debug\Exe\test01.out</name>
<outputs>
<tool>
<name>ILINK</name>
<file> 23</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 30 32 44 68 25 81 51 77 42 40 84 67 29 34 74</file>
</tool>
</inputs>
</file>
@@ -243,21 +298,21 @@
<outputs>
<tool>
<name>ICCARM</name>
<file> 15</file>
<file> 65</file>
</tool>
<tool>
<name>__cstat</name>
<file> 30</file>
<file> 55</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 12</file>
<file> 45</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 18 53 68 22 70 57 10 14 36 54 42 33 5 40 32 28 59 67 64 43 17 60 52 34 44 66 3 37 41 23 6</file>
<file> 62 36 28 72 35 19 52 71 47 14 39 56 8 54 75 69 24 16 27 33 1 15 21 46 38 17 5 59 63 70 60</file>
</tool>
</inputs>
</file>
@@ -266,73 +321,85 @@
<outputs>
<tool>
<name>BICOMP</name>
<file> 8</file>
<file> 66</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 14 36 53 68 22 70 57 54 42 6 5 40 32 28 59 67 64 43 17 60 52 34 44 66 3 37 41 23 33</file>
<file> 71 47 36 28 72 35 19 14 39 60 8 54 75 69 24 16 27 33 1 15 21 46 38 17 5 59 63 70 56</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Debug\Exe\test01.out</name>
<name>$PROJ_DIR$\..\utilities\fsl_assert.c</name>
<outputs>
<tool>
<name>ILINK</name>
<name>ICCARM</name>
<file> 73</file>
</tool>
<tool>
<name>__cstat</name>
<file> 7</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 50</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
<file> 71 74 56 21 47 31 76 46 48 25 69 58 26</file>
<name>ICCARM</name>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\user\delay.c</name>
<name>$PROJ_DIR$\..\drivers\fsl_uart.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 74</file>
<file> 81</file>
</tool>
<tool>
<name>__cstat</name>
<file> 89</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 75</file>
<file> 82</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23 73</file>
<file> 80 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\user\pin_Init.c</name>
<name>$PROJ_DIR$\..\user\uart_Interrupt.c</name>
<outputs>
<tool>
<name>ICCARM</name>
<file> 76</file>
<file> 84</file>
</tool>
<tool>
<name>__cstat</name>
<file> 92</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 77</file>
<file> 83</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCARM</name>
<file> 5 40 53 68 22 70 57 32 28 59 54 67 36 42 64 43 17 60 52 34 44 66 3 37 41 23 11 29 78</file>
<file> 8 54 36 28 72 35 19 75 69 24 14 16 47 39 27 33 1 15 21 46 38 17 5 59 63 70 87 80 78</file>
</tool>
</inputs>
</file>
<forcedrebuild>
<name>[MULTI_TOOL]</name>
<tool>ILINK</tool>
</forcedrebuild>
</configuration>
<configuration>
<name>Release</name>


+ 9
- 0
IAR/test01.ewp View File

@@ -2121,6 +2121,9 @@
<file>
<name>$PROJ_DIR$\..\drivers\fsl_port.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\drivers\fsl_uart.c</name>
</file>
</group>
<group>
<name>startup</name>
@@ -2145,5 +2148,11 @@
<file>
<name>$PROJ_DIR$\..\user\pin_Init.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\user\uart_Interrupt.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\user\uart_Interrupt.h</name>
</file>
</group>
</project>

+ 9
- 0
IAR/test01.ewt View File

@@ -2383,6 +2383,9 @@
<file>
<name>$PROJ_DIR$\..\drivers\fsl_port.h</name>
</file>
<file>
<name>$PROJ_DIR$\..\drivers\fsl_uart.c</name>
</file>
</group>
<group>
<name>startup</name>
@@ -2407,5 +2410,11 @@
<file>
<name>$PROJ_DIR$\..\user\pin_Init.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\user\uart_Interrupt.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\user\uart_Interrupt.h</name>
</file>
</group>
</project>

+ 2
- 2
user/main.c View File

@@ -3,16 +3,16 @@
#include "fsl_gpio.h"
#include "pin_Init.h"
#include "delay.h"
#include "uart_Interrupt.h"
/*********************************************
PTA15——LED灯闪烁
**********************************************/

void main()
{
CLOCK_EnableClock(kCLOCK_PortA); //开启PORT时钟
Delay_Init(); //延时函数初始化
pin_Init(); //GPIO初始化
UART_InterrputInit(); //UART2初始化
while (1)
{
GPIO_PinWrite(GPIOA, 15, 0);


+ 20
- 2
user/pin_Init.c View File

@@ -3,10 +3,12 @@
#include "fsl_port.h"
#include "fsl_gpio.h"
#include "pin_Init.h"
#include "fsl_uart.h"

/*****************GPIO初始化*************************/
/*****************PTA15初始化*************************/
void pin_Init()
{
CLOCK_EnableClock(kCLOCK_PortA); //开启PORT时钟
port_pin_config_t GPIO_Port_Init =
{
kPORT_PullUp , //上拉
@@ -25,4 +27,20 @@ void pin_Init()
};
GPIO_PinInit(GPIOA, 15U, &config); //初始化PTA15
GPIO_PinWrite(GPIOA, 15, 1); //PTA15写1
}
}

/*****************UART2引脚初始化*************************/
void UART2_InitPins(void)
{
CLOCK_EnableClock(kCLOCK_PortE); //开启PORT时钟
PORT_SetPinMux(PORTE, 16U, kPORT_MuxAlt3); //PTE16配置为UART2_TX
PORT_SetPinMux(PORTE, 17U, kPORT_MuxAlt3); //PTE17配置为UART2_RX
SIM->SOPT5 = ((SIM->SOPT5 &
/* UART1收发数据源选择*/
(~(SIM_SOPT5_UART1TXSRC_MASK | SIM_SOPT5_UART1RXSRC_MASK)))
| SIM_SOPT5_UART1TXSRC(SOPT5_UART1TXSRC_UART_TX)
| SIM_SOPT5_UART1RXSRC(SOPT5_UART1RXSRC_UART_RX));
}




+ 6
- 2
user/pin_Init.h View File

@@ -1,8 +1,12 @@
#ifndef _PIN_INIT_H_
#define _PIN_INIT_H_

/*****************函数声明*************************/
void pin_Init();
/*****************宏定义*************************/
#define SOPT5_UART1RXSRC_UART_RX 0x00u //选择UART1_RX pin模式接收数据
#define SOPT5_UART1TXSRC_UART_TX 0x00u //选择UART1_RT pin模式发送数据

/*****************函数声明*************************/
void pin_Init(); //PTA15引脚初始化
void UART2_InitPins(void); //UART2引脚初始化

#endif

+ 50
- 0
user/uart_Interrupt.c View File

@@ -0,0 +1,50 @@
/*****************头文件*************************/
#include "fsl_common.h"
#include "uart_Interrupt.h"
#include "fsl_uart.h"
#include "pin_Init.h"

/*****************变量声明*************************/
uint8_t demoRingBuffer[DEMO_RING_BUFFER_SIZE];
uint16_t txIndex; //发送数据计数变量
volatile uint16_t rxIndex; //接收数据计数变量

/*****************UART2初始化*************************/
void UART_InterrputInit()
{
UART2_InitPins(); //串口引脚初始化
uart_config_t config; //参数设置
UART_GetDefaultConfig(&config);
config.baudRate_Bps = BOARD_DEBUG_UART_BAUDRATE; //设置波特率
config.enableTx = true;
config.enableRx = true;
UART_Init(DEMO_UART, &config, SystemCoreClock); //初始化配置
UART_EnableInterrupts(DEMO_UART, kUART_RxDataRegFullInterruptEnable | kUART_RxOverrunInterruptEnable); //使能Rx中断
EnableIRQ(UART2_RX_TX_IRQn); //开启中断
}

/*****************UART2中断服务函数**********************/
void UART2_RX_TX_IRQHandler(void)
{
uint16_t data;
if ((kUART_RxDataRegFullFlag | kUART_RxOverrunFlag) & UART_GetStatusFlags(DEMO_UART)) //接收到数据标志
{
data = UART_ReadByte(DEMO_UART);
if (((rxIndex + 1) % DEMO_RING_BUFFER_SIZE) != txIndex) //
{
demoRingBuffer[rxIndex] = data;
rxIndex++;
rxIndex %= DEMO_RING_BUFFER_SIZE;
}
}
/*将接收到的数据返回*/
if ((kUART_TxDataRegEmptyFlag & UART_GetStatusFlags(DEMO_UART)) && (rxIndex != txIndex)) //发送中断标志
{
UART_WriteByte(DEMO_UART, demoRingBuffer[txIndex]); //发送一帧数据(一个字节,8个数据位)
txIndex++;
txIndex %= DEMO_RING_BUFFER_SIZE;
}
SDK_ISR_EXIT_BARRIER;
}



+ 14
- 0
user/uart_Interrupt.h View File

@@ -0,0 +1,14 @@
#ifndef _UART_INTERRUPT_H_
#define _UART_INTERRUPT_H_


/*****************宏定义*************************/
#define DEMO_UART UART2 // 选择串口UART2
#define BOARD_DEBUG_UART_BAUDRATE 115200 //设置波特率115200
#define DEMO_RING_BUFFER_SIZE 16

/*****************函数声明*************************/
void UART_InterrputInit(); //串口初始化


#endif

Loading…
Cancel
Save