Browse Source

实现UART0

div1
QQyyblithe 2 years ago
parent
commit
31ed50eb17
9 changed files with 229 additions and 216 deletions
  1. +10
    -12
      IAR/settings/test01.dbgdt
  2. +1
    -1
      IAR/settings/test01.dnx
  3. +31
    -22
      IAR/settings/test01.wsdt
  4. +159
    -159
      IAR/test01.dep
  5. +6
    -3
      user/main.c
  6. +8
    -8
      user/pin_Init.c
  7. +1
    -1
      user/pin_Init.h
  8. +12
    -9
      user/uart_Interrupt.c
  9. +1
    -1
      user/uart_Interrupt.h

+ 10
- 12
IAR/settings/test01.dbgdt
File diff suppressed because it is too large
View File


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

@@ -35,7 +35,7 @@
<LeaveTargetRunning>_ 0</LeaveTargetRunning>
</JLinkDriver>
<DebugChecksum>
<Checksum>1093669819</Checksum>
<Checksum>3711880284</Checksum>
</DebugChecksum>
<Exceptions>
<StopOnUncaught>_ 0</StopOnUncaught>


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


+ 159
- 159
IAR/test01.dep View File

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


+ 6
- 3
user/main.c View File

@@ -12,11 +12,11 @@ PTA15

void main()
{
MCG->C4 = 0x20;
MCG->C4 = 0x40;
SystemCoreClockUpdate ();
Delay_Init(); //延时函数初始化
pin_Init(); //GPIO初始化
UART1_InterrputInit(); //UART0初始化
UART0_InterrputInit(); //UART0初始化
UART2_InterrputInit(); //UART2初始化
while (1)
{
@@ -24,7 +24,10 @@ void main()
Delay_ms(500U);
GPIO_PinWrite(GPIOA, 15, 1);
Delay_ms(500U);
UART_WriteByte(UART1, 0x1A); //发送一帧数据(一个字节,8个数据位)
UART_WriteByte(UART0, 0x1A); //发送一帧数据(一个字节,8个数据位)
UART_WriteByte(UART0, 0x62); //发送一帧数据(一个字节,8个数据位)
UART_WriteByte(UART0, 0xc2); //发送一帧数据(一个字节,8个数据位)
UART_WriteByte(UART0, 0x40); //发送一帧数据(一个字节,8个数据位)
}

}


+ 8
- 8
user/pin_Init.c View File

@@ -42,17 +42,17 @@ void UART2_InitPins(void)
| SIM_SOPT5_UART1RXSRC(SOPT5_UART1RXSRC_UART_RX));
}

/*****************UART1引脚初始化*************************/
void UART1_InitPins(void)
/*****************UART0引脚初始化*************************/
void UART0_InitPins(void)
{
CLOCK_EnableClock(kCLOCK_PortE); //开启PORT时钟
PORT_SetPinMux(PORTE, 0U, kPORT_MuxAlt3); //PTE0配置为UART1_TX
PORT_SetPinMux(PORTE, 1U, kPORT_MuxAlt3); //PTE1配置为UART1_RX
CLOCK_EnableClock(kCLOCK_PortB); //开启PORT时钟
PORT_SetPinMux(PORTB, 0U, kPORT_MuxAlt7); //PTB0配置为UART0_RX
PORT_SetPinMux(PORTB, 1U, kPORT_MuxAlt7); //PTB1配置为UART0_TX
SIM->SOPT5 = ((SIM->SOPT5 &
/* UART0收发数据源选择*/
(~(SIM_SOPT5_UART1TXSRC_MASK | SIM_SOPT5_UART1RXSRC_MASK)))
| SIM_SOPT5_UART1TXSRC(SOPT5_UART1TXSRC_UART_TX)
| SIM_SOPT5_UART1RXSRC(SOPT5_UART1RXSRC_UART_RX));
(~(SIM_SOPT5_UART0TXSRC_MASK | SIM_SOPT5_UART0RXSRC_MASK)))
| SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX)
| SIM_SOPT5_UART0RXSRC(SOPT5_UART0RXSRC_UART_RX));
}




+ 1
- 1
user/pin_Init.h View File

@@ -10,6 +10,6 @@
/*****************변鑒�츠*************************/
void pin_Init(); //PTA15多신놓迦뺏
void UART2_InitPins(void); //UART2多신놓迦뺏
void UART1_InitPins(void); //UART1多신놓迦뺏
void UART0_InitPins(void); //UART0多신놓迦뺏

#endif

+ 12
- 9
user/uart_Interrupt.c View File

@@ -9,18 +9,18 @@ uint8_t demoRingBuffer[DEMO_RING_BUFFER_SIZE];
uint16_t txIndex; //发送数据计数
volatile uint16_t rxIndex; //接收数据计数

/*****************UART1初始化*************************/
void UART1_InterrputInit()
/*****************UART0初始化*************************/
void UART0_InterrputInit()
{
UART1_InitPins(); //UART1引脚初始化
UART0_InitPins(); //UART0引脚初始化
uart_config_t config; //参数设置
UART_GetDefaultConfig(&config);
config.baudRate_Bps = 2500000u; //设置波特率
config.enableTx = true;
config.enableRx = true;
UART_Init(UART1, &config, SystemCoreClock); //初始化配置
UART_EnableInterrupts(UART1, kUART_RxDataRegFullInterruptEnable | kUART_RxOverrunInterruptEnable); //使能Rx中断
EnableIRQ(UART1_RX_TX_IRQn); //开启中断
UART_Init(UART0, &config, SystemCoreClock); //初始化配置
UART_EnableInterrupts(UART0, kUART_RxDataRegFullInterruptEnable | kUART_RxOverrunInterruptEnable); //使能Rx中断
EnableIRQ(UART0_RX_TX_IRQn); //开启中断
}

/*****************UART2初始化*************************/
@@ -38,13 +38,16 @@ void UART2_InterrputInit()
UART_WriteByte(DEMO_UART, demoRingBuffer[txIndex]); //发送一帧数据(一个字节,8个数据位)
}

/*****************UART1中断服务函数**********************/
void UART1_RX_TX_IRQHandler(void)
uint16_t UART0_IRQ_Count = 0;
/*****************UART0中断服务函数**********************/
void UART0_RX_TX_IRQHandler(void)
{
uint16_t data;
UART0_IRQ_Count ++;
UART0_IRQ_Count %= 1000;
if ((kUART_RxDataRegFullFlag | kUART_RxOverrunFlag) & UART_GetStatusFlags(UART0)) //接收到数据标志
{
data = UART_ReadByte(UART1);
data = UART_ReadByte(UART0);
if (((rxIndex + 1) % DEMO_RING_BUFFER_SIZE) != txIndex) //
{
demoRingBuffer[rxIndex] = data;


+ 1
- 1
user/uart_Interrupt.h View File

@@ -9,7 +9,7 @@

/*****************函数声明*************************/
void UART2_InterrputInit(); //UART2串口初始化
void UART1_InterrputInit(); //UART0串口初始化
void UART0_InterrputInit(); //UART0串口初始化


#endif

Loading…
Cancel
Save