浏览代码

MCU-> ADC: Interrupt functioning with no NACK failure

namrota ghosh 10 月之前
父节点
当前提交
36332c54f9

+ 3 - 2
charge_controller_v7/.cproject

@@ -29,7 +29,7 @@
                             </option>
                             <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.1664574353" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="TICLANG_4.0.0.LTS" valueType="string"/>
                             <targetPlatform id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug.1064616742" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.targetPlatformDebug"/>
-                            <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug.629463878" name="GNU Make.Debug" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug"/>
+                            <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug.629463878" keepEnvironmentInBuildfile="false" name="GNU Make" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.builderDebug"/>
                             <tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug.1210514165" name="Arm Compiler" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.exe.compilerDebug">
                                 <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.2076963267" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.GENERATE_DWARF_DEBUG.GDWARF_3" valueType="enumerated"/>
                                 <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.1270557865" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.ENDIAN_NESS__BIG_LITTLE.MLITTLE_ENDIAN" valueType="enumerated"/>
@@ -45,7 +45,7 @@
                                     <listOptionValue value="${COM_TI_MSPM0_SDK_SYMBOLS}"/>
                                     <listOptionValue value="${SYSCONFIG_TOOL_SYMBOLS}"/>
                                 </option>
-                                <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.1723830578" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.2" valueType="enumerated"/>
+                                <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.1723830578" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.OPT_LEVEL.0" valueType="enumerated"/>
                                 <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.CMD_FILE.808039626" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.compilerID.CMD_FILE" valueType="stringList">
                                     <listOptionValue value="device.opt"/>
                                 </option>
@@ -75,6 +75,7 @@
                                     <listOptionValue value="device.cmd.genlibs"/>
                                     <listOptionValue value="libc.a"/>
                                 </option>
+                                <option id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE.1870714999" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.linkerID.HEAP_SIZE" value="0x1000" valueType="string"/>
                             </tool>
                             <tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex.1965667293" name="Arm Hex Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.hex"/>
                             <tool id="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy.757224353" name="Arm Objcopy Utility" superClass="com.ti.ccstudio.buildDefinitions.TMS470_TICLANG_4.0.objcopy"/>

二进制
charge_controller_v7/Debug/.clangd/.cache/clangd/index/i2c_comm_controller.c.203F8B33309E2B48.idx


二进制
charge_controller_v7/Debug/.clangd/.cache/clangd/index/i2c_controller.c.D084D0AF1C0F98F4.idx


二进制
charge_controller_v7/Debug/.clangd/.cache/clangd/index/ti_msp_dl_config.h.6C46FDF13D1C9C02.idx


+ 543 - 215
charge_controller_v7/Debug/charge_controller_v7.map

@@ -1,18 +1,18 @@
 ******************************************************************************
             TI ARM Clang Linker Unix v4.0.0                    
 ******************************************************************************
->> Linked Fri Feb 14 09:18:04 2025
+>> Linked Fri Feb 14 10:39:38 2025
 
 OUTPUT FILE NAME:   <charge_controller_v7.out>
-ENTRY POINT SYMBOL: "_c_int00_noargs"  address: 0000070d
+ENTRY POINT SYMBOL: "_c_int00_noargs"  address: 00002145
 
 
 MEMORY CONFIGURATION
 
          name            origin    length      used     unused   attr    fill
 ----------------------  --------  ---------  --------  --------  ----  --------
-  FLASH                 00000000   00020000  00000870  0001f790  R  X
-  SRAM                  20200000   00008000  000002f1  00007d0f  RW X
+  FLASH                 00000000   00020000  00002978  0001d688  R  X
+  SRAM                  20200000   00008000  000016d9  00006927  RW X
   BCR_CONFIG            41c00000   00000080  00000000  00000080  R   
   BSL_CONFIG            41c00100   00000080  00000000  00000080  R   
 
@@ -21,14 +21,15 @@ SEGMENT ALLOCATION MAP
 
 run origin  load origin   length   init length attrs members
 ----------  ----------- ---------- ----------- ----- -------
-00000000    00000000    00000870   00000870    r-x
+00000000    00000000    00002978   00002978    r-x
   00000000    00000000    000000c0   000000c0    r-- .intvecs
-  000000c0    000000c0    00000760   00000760    r-x .text
-  00000820    00000820    00000008   00000008    r-- .rodata
-  00000828    00000828    00000048   00000048    r-- .cinit
-20200000    20200000    000000f1   00000000    rw-
-  20200000    20200000    000000b0   00000000    rw- .bss
-  202000b0    202000b0    00000041   00000000    rw- .data
+  000000c0    000000c0    00002590   00002590    r-x .text
+  00002650    00002650    00000280   00000280    r-- .rodata
+  000028d0    000028d0    000000a8   000000a8    r-- .cinit
+20200000    20200000    000014d9   00000000    rw-
+  20200000    20200000    00001000   00000000    rw- .sysmem
+  20201000    20201000    000002c4   00000000    rw- .bss
+  202012c4    202012c4    00000215   00000000    rw- .data
 20207e00    20207e00    00000200   00000000    rw-
   20207e00    20207e00    00000200   00000000    rw- .stack
 
@@ -41,60 +42,195 @@ section   page    origin      length       input sections
 .intvecs   0    00000000    000000c0     
                   00000000    000000c0     startup_mspm0g350x_ticlang.o (.intvecs)
 
-.text      0    000000c0    00000760     
-                  000000c0    000001b4     i2c_comm_controller.o (.text.I2C_sendCommand)
-                  00000274    000000a0     i2c_controller.o (.text.main)
-                  00000314    0000009a     libc.a : memcpy16.S.obj (.text:memcpy)
-                  000003ae    00000002     startup_mspm0g350x_ticlang.o (.text.Default_Handler)
-                  000003b0    00000098     driverlib.a : dl_crc.o (.text.DL_CRC_calculateBlock16)
-                  00000448    00000090     i2c_comm_controller.o (.text.I2C_getResponse)
-                  000004d8    0000007c     libc.a : copy_decompress_lzss.c.obj (.text:decompress:lzss)
-                  00000554    0000006c     ti_msp_dl_config.o (.text.SYSCFG_DL_I2C_controller_init)
-                  000005c0    0000005e     driverlib.a : dl_i2c.o (.text.DL_I2C_fillControllerTXFIFO)
-                  0000061e    00000002     libclang_rt.builtins.a : aeabi_div0.c.obj (.text.__aeabi_idiv0)
-                  00000620    00000040     ti_msp_dl_config.o (.text.SYSCFG_DL_initPower)
-                  00000660    00000040     libclang_rt.builtins.a : aeabi_uidivmod.S.obj (.text.__aeabi_uidivmod)
-                  000006a0    0000003c     libc.a : autoinit.c.obj (.text:__TI_auto_init_nobinit_nopinit)
-                  000006dc    00000030     ti_msp_dl_config.o (.text.SYSCFG_DL_SYSCTL_init)
-                  0000070c    00000028     libc.a : boot_cortex_m.c.obj (.text:_c_int00_noargs)
-                  00000734    00000026     driverlib.a : dl_i2c.o (.text.DL_I2C_setClockConfig)
-                  0000075a    00000002     --HOLE-- [fill = 0]
-                  0000075c    00000024     ti_msp_dl_config.o (.text.SYSCFG_DL_GPIO_init)
-                  00000780    00000020     ti_msp_dl_config.o (.text.SYSCFG_DL_CRC_init)
-                  000007a0    0000001e     i2c_comm_controller.o (.text.I2C_init)
-                  000007be    00000018     ti_msp_dl_config.o (.text.SYSCFG_DL_init)
-                  000007d6    00000016     libc.a : copy_zero_init.c.obj (.text:decompress:ZI:__TI_zero_init_nomemset)
-                  000007ec    00000012            : copy_decompress_none.c.obj (.text:decompress:none)
-                  000007fe    0000000a     driverlib.a : dl_common.o (.text.DL_Common_delayCycles)
-                  00000808    00000008     libclang_rt.builtins.a : aeabi_memcpy.S.obj (.text.__aeabi_memcpy)
-                  00000810    00000004     startup_mspm0g350x_ticlang.o (.text.Reset_Handler)
-                  00000814    00000004     libc.a : pre_init.c.obj (.text._system_pre_init)
-                  00000818    00000004            : exit.c.obj (.text:abort)
-                  0000081c    00000004     --HOLE-- [fill = 0]
-
-.cinit     0    00000828    00000048     
-                  00000828    00000023     (.cinit..data.load) [load image, compression = lzss]
-                  0000084b    00000001     --HOLE-- [fill = 0]
-                  0000084c    0000000c     (__TI_handler_table)
-                  00000858    00000008     (.cinit..bss.load) [load image, compression = zero_init]
-                  00000860    00000010     (__TI_cinit_table)
-
-.rodata    0    00000820    00000008     
-                  00000820    00000002     ti_msp_dl_config.o (.rodata.gI2C_controllerClockConfig)
-                  00000822    00000006     --HOLE-- [fill = 0]
+.text      0    000000c0    00002590     
+                  000000c0    00000868     libc.a : _printfi.c.obj (.text:__TI_printfi_nofloat)
+                  00000928    00000144     i2c_controller.o (.text.I2C1_IRQHandler)
+                  00000a6c    00000114     i2c_comm_controller.o (.text.I2C_sendCommand)
+                  00000b80    00000114     libc.a : memory.c.obj (.text.aligned_alloc)
+                  00000c94    000000f8            : fputs.c.obj (.text.fputs)
+                  00000d8c    000000f4     i2c_comm_controller.o (.text.I2C_sendBuffer)
+                  00000e80    000000e8     libc.a : memory.c.obj (.text.free)
+                  00000f68    000000e0            : setvbuf.c.obj (.text.setvbuf)
+                  00001048    000000b8     i2c_comm_controller.o (.text.I2C_decodeResponse)
+                  00001100    000000b4     i2c_controller.o (.text.main)
+                  000011b4    000000a2     libclang_rt.builtins.a : udivmoddi4.S.obj (.text)
+                  00001256    00000002                            : aeabi_div0.c.obj (.text.__aeabi_idiv0)
+                  00001258    0000009c     libc.a : fputc.c.obj (.text.fputc)
+                  000012f4    00000098     driverlib.a : dl_crc.o (.text.DL_CRC_calculateBlock16)
+                  0000138c    00000098     i2c_comm_controller.o (.text.I2C_getResponse)
+                  00001424    0000000c     libclang_rt.builtins.a : aeabi_memset.S.obj (.text.__aeabi_memclr)
+                  00001430    00000088     libc.a : strcmp-armv6m.S.obj (.text:strcmp)
+                  000014b8    0000007c            : fclose.c.obj (.text.__TI_closefile)
+                  00001534    0000007c            : copy_decompress_lzss.c.obj (.text:decompress:lzss)
+                  000015b0    0000006c     i2c_comm_controller.o (.text.CRC_calc16)
+                  0000161c    0000006c     libsysbm.a : hostlseek.c.obj (.text.HOSTlseek)
+                  00001688    0000006c                : hostrename.c.obj (.text.HOSTrename)
+                  000016f4    0000006c     libc.a : fseek.c.obj (.text.fseeko)
+                  00001760    0000006c            : getdevice.c.obj (.text.getdevice)
+                  000017cc    00000064            : _io_perm.c.obj (.text.__TI_wrt_ok)
+                  00001830    00000064            : memory.c.obj (.text.split)
+                  00001894    00000060     libsysbm.a : hostopen.c.obj (.text.HOSTopen)
+                  000018f4    0000005e     driverlib.a : dl_i2c.o (.text.DL_I2C_fillControllerTXFIFO)
+                  00001952    00000002     libclang_rt.builtins.a : aeabi_div0.c.obj (.text.__aeabi_ldiv0)
+                  00001954    0000005c     libc.a : printf.c.obj (.text.printf)
+                  000019b0    00000058     libsysbm.a : hostread.c.obj (.text.HOSTread)
+                  00001a08    00000058                : hostwrite.c.obj (.text.HOSTwrite)
+                  00001a60    00000058     ti_msp_dl_config.o (.text.SYSCFG_DL_I2C_controller_init)
+                  00001ab8    00000058     ti_msp_dl_config.o (.text.SYSCFG_DL_initPower)
+                  00001b10    00000052     libc.a : fflush.c.obj (.text.__TI_doflush)
+                  00001b62    00000002            : _lock.c.obj (.text._nop)
+                  00001b64    00000050     i2c_comm_controller.o (.text.DL_I2C_startControllerTransfer)
+                  00001bb4    00000050     libsysbm.a : close.c.obj (.text.close)
+                  00001c04    00000048                : hostclose.c.obj (.text.HOSTclose)
+                  00001c4c    00000048                : hostunlink.c.obj (.text.HOSTunlink)
+                  00001c94    00000046     ti_msp_dl_config.o (.text.SYSCFG_DL_GPIO_init)
+                  00001cda    00000002     --HOLE-- [fill = 0]
+                  00001cdc    00000040     libclang_rt.builtins.a : aeabi_uidivmod.S.obj (.text.__aeabi_uidivmod)
+                  00001d1c    00000040     libc.a : atoi.c.obj (.text.atoi)
+                  00001d5c    0000003c     ti_msp_dl_config.o (.text.DL_GPIO_initPeripheralInputFunctionFeatures)
+                  00001d98    0000003c     libc.a : autoinit.c.obj (.text:__TI_auto_init_nobinit_nopinit)
+                  00001dd4    0000003a     libclang_rt.builtins.a : muldsi3.S.obj (.text.__muldsi3)
+                  00001e0e    00000038     ti_msp_dl_config.o (.text.DL_CRC_init)
+                  00001e46    00000002     --HOLE-- [fill = 0]
+                  00001e48    00000034     libc.a : fopen.c.obj (.text.__TI_cleanup)
+                  00001e7c    00000034     libsysbm.a : trgmsg.c.obj (.text.__TI_readmsg)
+                  00001eb0    00000034                : trgmsg.c.obj (.text.__TI_writemsg)
+                  00001ee4    00000034     libc.a : exit.c.obj (.text.exit)
+                  00001f18    00000034            : getdevice.c.obj (.text.finddevice)
+                  00001f4c    00000032     i2c_comm_controller.o (.text.I2C_init)
+                  00001f7e    0000002e     i2c_comm_controller.o (.text.u8From32)
+                  00001fac    0000002c     i2c_controller.o (.text.__NVIC_EnableIRQ)
+                  00001fd8    0000002c     libsysbm.a : unlink.c.obj (.text.unlink)
+                  00002004    00000028     i2c_comm_controller.o (.text.DL_Common_updateReg)
+                  0000202c    00000028     ti_msp_dl_config.o (.text.DL_Common_updateReg)
+                  00002054    00000028     ti_msp_dl_config.o (.text.DL_I2C_setControllerRXFIFOThreshold)
+                  0000207c    00000028     ti_msp_dl_config.o (.text.DL_I2C_setControllerTXFIFOThreshold)
+                  000020a4    00000028     ti_msp_dl_config.o (.text.SYSCFG_DL_CRC_init)
+                  000020cc    00000028     libc.a : memory.c.obj (.text.free_list_insert)
+                  000020f4    00000028     libsysbm.a : lseek.c.obj (.text.lseek)
+                  0000211c    00000028                : write.c.obj (.text.write)
+                  00002144    00000028     libc.a : boot_cortex_m.c.obj (.text:_c_int00_noargs)
+                  0000216c    00000026     driverlib.a : dl_i2c.o (.text.DL_I2C_setClockConfig)
+                  00002192    00000002     --HOLE-- [fill = 0]
+                  00002194    00000024     ti_msp_dl_config.o (.text.DL_CRC_setSeed16)
+                  000021b8    00000024     libclang_rt.builtins.a : muldi3.S.obj (.text.__muldi3)
+                  000021dc    00000022     libc.a : memccpy.c.obj (.text.memccpy)
+                  000021fe    00000022     i2c_comm_controller.o (.text.u8From16)
+                  00002220    00000020     i2c_comm_controller.o (.text.DL_CRC_feedData8)
+                  00002240    0000001e     ti_msp_dl_config.o (.text.SYSCFG_DL_SYSCTL_init)
+                  0000225e    00000002     --HOLE-- [fill = 0]
+                  00002260    0000001e     libclang_rt.builtins.a : ashldi3.S.obj (.text.__ashldi3)
+                  0000227e    0000001e     i2c_comm_controller.o (.text.u16)
+                  0000229c    0000001c     ti_msp_dl_config.o (.text.DL_GPIO_enableHiZ)
+                  000022b8    0000001c     i2c_comm_controller.o (.text.DL_I2C_disableInterrupt)
+                  000022d4    0000001c     i2c_controller.o (.text.DL_I2C_disableInterrupt)
+                  000022f0    0000001c     i2c_comm_controller.o (.text.DL_I2C_enableInterrupt)
+                  0000230c    0000001c     ti_msp_dl_config.o (.text.DL_I2C_enableInterrupt)
+                  00002328    0000001c     i2c_controller.o (.text.DL_I2C_isControllerRXFIFOEmpty)
+                  00002344    0000001c     ti_msp_dl_config.o (.text.DL_SYSCTL_setSYSOSCFreq)
+                  00002360    0000001c     libc.a : memory.c.obj (.text.free_list_remove)
+                  0000237c    00000018     ti_msp_dl_config.o (.text.DL_CRC_enablePower)
+                  00002394    00000018     ti_msp_dl_config.o (.text.DL_CRC_reset)
+                  000023ac    00000018     ti_msp_dl_config.o (.text.DL_GPIO_enablePower)
+                  000023c4    00000018     ti_msp_dl_config.o (.text.DL_GPIO_reset)
+                  000023dc    00000018     ti_msp_dl_config.o (.text.DL_I2C_disableAnalogGlitchFilter)
+                  000023f4    00000018     ti_msp_dl_config.o (.text.DL_I2C_enableController)
+                  0000240c    00000018     ti_msp_dl_config.o (.text.DL_I2C_enableControllerClockStretching)
+                  00002424    00000018     ti_msp_dl_config.o (.text.DL_I2C_enablePower)
+                  0000243c    00000018     ti_msp_dl_config.o (.text.DL_I2C_reset)
+                  00002454    00000018     ti_msp_dl_config.o (.text.DL_I2C_setTimerPeriod)
+                  0000246c    00000018     ti_msp_dl_config.o (.text.DL_SYSCTL_setBORThreshold)
+                  00002484    00000018     ti_msp_dl_config.o (.text.SYSCFG_DL_init)
+                  0000249c    00000016     i2c_comm_controller.o (.text.I2C_clearBuffer)
+                  000024b2    00000016     libc.a : copy_zero_init.c.obj (.text:decompress:ZI:__TI_zero_init_nomemset)
+                  000024c8    00000014     i2c_comm_controller.o (.text.DL_CRC_getResult16)
+                  000024dc    00000014     i2c_comm_controller.o (.text.DL_I2C_getControllerStatus)
+                  000024f0    00000014     i2c_controller.o (.text.DL_I2C_receiveControllerData)
+                  00002504    00000014     ti_msp_dl_config.o (.text.DL_I2C_resetControllerTransfer)
+                  00002518    00000014     ti_msp_dl_config.o (.text.DL_SYSCTL_disableSYSPLL)
+                  0000252c    00000014     libclang_rt.builtins.a : aeabi_uldivmod.S.obj (.text.__aeabi_uldivmod)
+                  00002540    00000012     i2c_controller.o (.text.DL_I2C_getPendingInterrupt)
+                  00002552    00000012     libc.a : memcpy16.S.obj (.text:TI_memcpy_small)
+                  00002564    00000012            : copy_decompress_none.c.obj (.text:decompress:none)
+                  00002576    00000002     --HOLE-- [fill = 0]
+                  00002578    00000010     ti_msp_dl_config.o (.text.DL_SYSCTL_disableHFXT)
+                  00002588    00000010     libc.a : wcslen.c.obj (.text.wcslen)
+                  00002598    0000000e            : memory.c.obj (.text.OUTLINED_FUNCTION_0)
+                  000025a6    00000002     --HOLE-- [fill = 0]
+                  000025a8    0000000e     libclang_rt.builtins.a : aeabi_memset.S.obj (.text.__aeabi_memset)
+                  000025b6    0000000e     libsysbm.a : hostrename.c.obj (.text.strcpy)
+                  000025c4    0000000e     libc.a : _printfi.c.obj (.text.strlen)
+                  000025d2    0000000e     libsysbm.a : hostrename.c.obj (.text.strlen)
+                  000025e0    0000000e     libc.a : memset16.S.obj (.text:TI_memset_small)
+                  000025ee    0000000c            : memory.c.obj (.text.malloc)
+                  000025fa    0000000a     driverlib.a : dl_common.o (.text.DL_Common_delayCycles)
+                  00002604    00000008     libc.a : aeabi_portable.c.obj (.text.__aeabi_errno_addr)
+                  0000260c    00000008     libclang_rt.builtins.a : aeabi_memcpy.S.obj (.text.__aeabi_memcpy)
+                  00002614    00000008     libc.a : printf.c.obj (.text._outc)
+                  0000261c    00000008            : printf.c.obj (.text._outs)
+                  00002624    00000008            : fseek.c.obj (.text.fseek)
+                  0000262c    00000008     libsysbm.a : remove.c.obj (.text.remove)
+                  00002634    00000004     startup_mspm0g350x_ticlang.o (.text.Default_Handler)
+                  00002638    00000004     startup_mspm0g350x_ticlang.o (.text.Reset_Handler)
+                  0000263c    00000004     libc.a : pre_init.c.obj (.text._system_pre_init)
+                  00002640    00000004            : exit.c.obj (.text:abort)
+                  00002644    0000000c     --HOLE-- [fill = 0]
+
+.cinit     0    000028d0    000000a8     
+                  000028d0    00000081     (.cinit..data.load) [load image, compression = lzss]
+                  00002951    00000003     --HOLE-- [fill = 0]
+                  00002954    0000000c     (__TI_handler_table)
+                  00002960    00000008     (.cinit..bss.load) [load image, compression = zero_init]
+                  00002968    00000010     (__TI_cinit_table)
+
+.rodata    0    00002650    00000280     
+                  00002650    00000101     libc.a : aeabi_ctype.S.obj (.rodata:__aeabi_ctype_table_)
+                  00002751    00000036     i2c_controller.o (.rodata.str1.44366518634961814551)
+                  00002787    00000028     i2c_controller.o (.rodata.str1.45413293569381271681)
+                  000027af    00000025     i2c_comm_controller.o (.rodata.str1.163525924617054880731)
+                  000027d4    00000023     i2c_controller.o (.rodata.str1.131162329971773874431)
+                  000027f7    00000023     i2c_controller.o (.rodata.str1.88302742758134196721)
+                  0000281a    00000021     i2c_comm_controller.o (.rodata.str1.112954391457799748471)
+                  0000283b    0000001e     i2c_controller.o (.rodata.str1.73547382206234533101)
+                  00002859    0000001a     i2c_controller.o (.rodata.str1.18055892228792878831)
+                  00002873    0000001a     i2c_comm_controller.o (.rodata.str1.87099279538584691801)
+                  0000288d    00000014     i2c_controller.o (.rodata.str1.89005588678899653321)
+                  000028a1    00000011     libc.a : _printfi.c.obj (.rodata.str1.103488685894817597201)
+                  000028b2    00000011            : _printfi.c.obj (.rodata.str1.153638888446227384661)
+                  000028c3    00000002     ti_msp_dl_config.o (.rodata.gI2C_controllerClockConfig)
+                  000028c5    0000000b     --HOLE-- [fill = 0]
 
 .init_array 
 *          0    00000000    00000000     UNINITIALIZED
 
 .binit     0    00000000    00000000     
 
-.bss       0    20200000    000000b0     UNINITIALIZED
-                  20200000    0000009c     (.common:gI2C)
-                  2020009c    00000014     (.common:gCommand)
-
-.data      0    202000b0    00000041     UNINITIALIZED
-                  202000b0    00000040     i2c_controller.o (.data.gTxData)
-                  202000f0    00000001     i2c_controller.o (.data.gSendCommand)
+.sysmem    0    20200000    00001000     UNINITIALIZED
+                  20200000    00000010     libc.a : memory.c.obj (.sysmem)
+                  20200010    00000ff0     --HOLE--
+
+.bss       0    20201000    000002c4     UNINITIALIZED
+                  20201000    00000120     libsysbm.a : trgmsg.c.obj (.bss:_CIOBUF_)
+                  20201120    000000a0     libc.a : defs.c.obj (.bss.__TI_tmpnams)
+                  202011c0    0000009c     (.common:gI2C)
+                  2020125c    00000048     (.common:gResponse)
+                  202012a4    00000014     (.common:gCommand)
+                  202012b8    00000008     libsysbm.a : hostopen.c.obj (.bss.parmbuf)
+                  202012c0    00000004     libc.a : memory.c.obj (.bss.sys_free)
+
+.data      0    202012c4    00000215     UNINITIALIZED
+                  202012c4    000000f0     libc.a : defs.c.obj (.data._ftable)
+                  202013b4    00000078     libsysbm.a : host_device.c.obj (.data._device)
+                  2020142c    00000050                : host_device.c.obj (.data._stream)
+                  2020147c    00000040     i2c_controller.o (.data.gTxData)
+                  202014bc    00000008     libc.a : exit.c.obj (.data..L_MergedGlobals)
+                  202014c4    00000004            : defs.c.obj (.data.__TI_ft_end)
+                  202014c8    00000004            : aeabi_portable.c.obj (.data.__aeabi_errno)
+                  202014cc    00000004            : _lock.c.obj (.data._lock)
+                  202014d0    00000004            : _lock.c.obj (.data._unlock)
+                  202014d4    00000001     i2c_controller.o (.data.gSendCommand)
+                  202014d5    00000003     --HOLE--
+                  202014d8    00000001     libc.a : memory.c.obj (.data.memory_is_initialized)
 
 .stack     0    20207e00    00000200     UNINITIALIZED
                   20207e00    00000004     libc.a : boot_cortex_m.c.obj (.stack)
@@ -111,35 +247,80 @@ MODULE SUMMARY
        Module                         code   ro data   rw data
        ------                         ----   -------   -------
     ./
-       i2c_controller.o               160    0         241    
-       ti_msp_dl_config.o             312    2         0      
-       startup_mspm0g350x_ticlang.o   6      192       0      
+       i2c_controller.o               642    240       313    
+       ti_msp_dl_config.o             1016   2         0      
+       startup_mspm0g350x_ticlang.o   8      192       0      
     +--+------------------------------+------+---------+---------+
-       Total:                         478    194       241    
+       Total:                         1666   434       313    
                                                               
     ./ti/comm_modules/i2c/controller/
-       i2c_comm_controller.o          610    0         0      
+       i2c_comm_controller.o          1394   96        0      
     +--+------------------------------+------+---------+---------+
-       Total:                         610    0         0      
+       Total:                         1394   96        0      
                                                               
     /home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib/armv6m-ti-none-eabi/c/libc.a
-       memcpy16.S.obj                 154    0         0      
+       _printfi.c.obj                 2166   34        0      
+       memory.c.obj                   702    0         5      
+       defs.c.obj                     0      0         404    
+       aeabi_ctype.S.obj              0      257       0      
+       fputs.c.obj                    248    0         0      
+       setvbuf.c.obj                  224    0         0      
+       getdevice.c.obj                160    0         0      
+       fputc.c.obj                    156    0         0      
+       strcmp-armv6m.S.obj            136    0         0      
        copy_decompress_lzss.c.obj     124    0         0      
+       fclose.c.obj                   124    0         0      
+       fseek.c.obj                    116    0         0      
+       printf.c.obj                   108    0         0      
+       _io_perm.c.obj                 100    0         0      
+       fflush.c.obj                   82     0         0      
+       atoi.c.obj                     64     0         0      
+       exit.c.obj                     56     0         8      
        autoinit.c.obj                 60     0         0      
+       fopen.c.obj                    52     0         0      
        boot_cortex_m.c.obj            40     0         0      
+       memccpy.c.obj                  34     0         0      
        copy_zero_init.c.obj           22     0         0      
        copy_decompress_none.c.obj     18     0         0      
-       exit.c.obj                     4      0         0      
+       memcpy16.S.obj                 18     0         0      
+       wcslen.c.obj                   16     0         0      
+       memset16.S.obj                 14     0         0      
+       aeabi_portable.c.obj           8      0         4      
+       _lock.c.obj                    2      0         8      
        pre_init.c.obj                 4      0         0      
     +--+------------------------------+------+---------+---------+
-       Total:                         426    0         0      
+       Total:                         4854   291       429    
+                                                              
+    /home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib/armv6m-ti-none-eabi/c/libsysbm.a
+       trgmsg.c.obj                   104    0         288    
+       host_device.c.obj              0      0         200    
+       hostrename.c.obj               136    0         0      
+       hostlseek.c.obj                108    0         0      
+       hostopen.c.obj                 96     0         8      
+       hostread.c.obj                 88     0         0      
+       hostwrite.c.obj                88     0         0      
+       close.c.obj                    80     0         0      
+       hostclose.c.obj                72     0         0      
+       hostunlink.c.obj               72     0         0      
+       unlink.c.obj                   44     0         0      
+       lseek.c.obj                    40     0         0      
+       write.c.obj                    40     0         0      
+       remove.c.obj                   8      0         0      
+    +--+------------------------------+------+---------+---------+
+       Total:                         976    0         496    
                                                               
     /home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib/armv6m-ti-none-eabi/libclang_rt.builtins.a
+       udivmoddi4.S.obj               162    0         0      
        aeabi_uidivmod.S.obj           64     0         0      
+       muldsi3.S.obj                  58     0         0      
+       muldi3.S.obj                   36     0         0      
+       ashldi3.S.obj                  30     0         0      
+       aeabi_memset.S.obj             26     0         0      
+       aeabi_uldivmod.S.obj           20     0         0      
        aeabi_memcpy.S.obj             8      0         0      
-       aeabi_div0.c.obj               2      0         0      
+       aeabi_div0.c.obj               4      0         0      
     +--+------------------------------+------+---------+---------+
-       Total:                         74     0         0      
+       Total:                         408    0         0      
                                                               
     /home/ngosh/ti/mspm0_sdk_2_03_00_07/source/ti/driverlib/lib/ticlang/m0p/mspm0g1x0x_g3x0x/driverlib.a
        dl_crc.o                       152    0         0      
@@ -148,22 +329,23 @@ MODULE SUMMARY
     +--+------------------------------+------+---------+---------+
        Total:                         294    0         0      
                                                               
+       Heap:                          0      0         4096   
        Stack:                         0      0         512    
-       Linker Generated:              0      71        0      
+       Linker Generated:              0      165       0      
     +--+------------------------------+------+---------+---------+
-       Grand Total:                   1882   265       753    
+       Grand Total:                   9592   986       5846   
 
 
 LINKER GENERATED COPY TABLES
 
-__TI_cinit_table @ 00000860 records: 2, size/record: 8, table size: 16
-	.data: load addr=00000828, load size=00000023 bytes, run addr=202000b0, run size=00000041 bytes, compression=lzss
-	.bss: load addr=00000858, load size=00000008 bytes, run addr=20200000, run size=000000b0 bytes, compression=zero_init
+__TI_cinit_table @ 00002968 records: 2, size/record: 8, table size: 16
+	.data: load addr=000028d0, load size=00000081 bytes, run addr=202012c4, run size=00000215 bytes, compression=lzss
+	.bss: load addr=00002960, load size=00000008 bytes, run addr=20201000, run size=000002c4 bytes, compression=zero_init
 
 
 LINKER GENERATED HANDLER TABLE
 
-__TI_handler_table @ 0000084c records: 3, size/record: 4, table size: 12
+__TI_handler_table @ 00002954 records: 3, size/record: 4, table size: 12
 	index: 0, handler: __TI_decompress_lzss
 	index: 1, handler: __TI_decompress_none
 	index: 2, handler: __TI_zero_init
@@ -173,53 +355,67 @@ GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name
 
 address   name                          
 -------   ----                          
-000003af  ADC0_IRQHandler               
-000003af  ADC1_IRQHandler               
-000003af  AES_IRQHandler                
-00000818  C$$EXIT                       
-000003af  CANFD0_IRQHandler             
-000003af  DAC0_IRQHandler               
-000003b1  DL_CRC_calculateBlock16       
-000007ff  DL_Common_delayCycles         
-000005c1  DL_I2C_fillControllerTXFIFO   
-00000735  DL_I2C_setClockConfig         
-000003af  DMA_IRQHandler                
-000003af  Default_Handler               
-000003af  GROUP0_IRQHandler             
-000003af  GROUP1_IRQHandler             
-000003af  HardFault_Handler             
-000003af  I2C0_IRQHandler               
-000003af  I2C1_IRQHandler               
-00000449  I2C_getResponse               
-000007a1  I2C_init                      
-000000c1  I2C_sendCommand               
-000003af  NMI_Handler                   
-000003af  PendSV_Handler                
-000003af  RTC_IRQHandler                
-00000811  Reset_Handler                 
-000003af  SPI0_IRQHandler               
-000003af  SPI1_IRQHandler               
-000003af  SVC_Handler                   
-00000781  SYSCFG_DL_CRC_init            
-0000075d  SYSCFG_DL_GPIO_init           
-00000555  SYSCFG_DL_I2C_controller_init 
-000006dd  SYSCFG_DL_SYSCTL_init         
-000007bf  SYSCFG_DL_init                
-00000621  SYSCFG_DL_initPower           
-000003af  SysTick_Handler               
-000003af  TIMA0_IRQHandler              
-000003af  TIMA1_IRQHandler              
-000003af  TIMG0_IRQHandler              
-000003af  TIMG12_IRQHandler             
-000003af  TIMG6_IRQHandler              
-000003af  TIMG7_IRQHandler              
-000003af  TIMG8_IRQHandler              
-000003af  UART0_IRQHandler              
-000003af  UART1_IRQHandler              
-000003af  UART2_IRQHandler              
-000003af  UART3_IRQHandler              
+00002635  ADC0_IRQHandler               
+00002635  ADC1_IRQHandler               
+00002635  AES_IRQHandler                
+00002640  C$$EXIT                       
+00001edd  C$$IO$$                       
+00002635  CANFD0_IRQHandler             
+00002635  DAC0_IRQHandler               
+000012f5  DL_CRC_calculateBlock16       
+000025fb  DL_Common_delayCycles         
+000018f5  DL_I2C_fillControllerTXFIFO   
+0000216d  DL_I2C_setClockConfig         
+00002635  DMA_IRQHandler                
+00002635  Default_Handler               
+00002635  GROUP0_IRQHandler             
+00002635  GROUP1_IRQHandler             
+00001c05  HOSTclose                     
+0000161d  HOSTlseek                     
+00001895  HOSTopen                      
+000019b1  HOSTread                      
+00001689  HOSTrename                    
+00001c4d  HOSTunlink                    
+00001a09  HOSTwrite                     
+00002635  HardFault_Handler             
+00002635  I2C0_IRQHandler               
+00000929  I2C1_IRQHandler               
+00001049  I2C_decodeResponse            
+0000138d  I2C_getResponse               
+00001f4d  I2C_init                      
+00000a6d  I2C_sendCommand               
+00002635  NMI_Handler                   
+00002635  PendSV_Handler                
+00002635  RTC_IRQHandler                
+00002639  Reset_Handler                 
+00002635  SPI0_IRQHandler               
+00002635  SPI1_IRQHandler               
+00002635  SVC_Handler                   
+000020a5  SYSCFG_DL_CRC_init            
+00001c95  SYSCFG_DL_GPIO_init           
+00001a61  SYSCFG_DL_I2C_controller_init 
+00002241  SYSCFG_DL_SYSCTL_init         
+00002485  SYSCFG_DL_init                
+00001ab9  SYSCFG_DL_initPower           
+00002635  SysTick_Handler               
+00002635  TIMA0_IRQHandler              
+00002635  TIMA1_IRQHandler              
+00002635  TIMG0_IRQHandler              
+00002635  TIMG12_IRQHandler             
+00002635  TIMG6_IRQHandler              
+00002635  TIMG7_IRQHandler              
+00002635  TIMG8_IRQHandler              
+00002553  TI_memcpy_small               
+000025e1  TI_memset_small               
+00002635  UART0_IRQHandler              
+00002635  UART1_IRQHandler              
+00002635  UART2_IRQHandler              
+00002635  UART3_IRQHandler              
+20201000  _CIOBUF_                      
+20201000  __CIOBUF_                     
 20208000  __STACK_END                   
 00000200  __STACK_SIZE                  
+00001000  __SYSMEM_SIZE                 
 00000000  __TI_ATRegion0_region_sz      
 00000000  __TI_ATRegion0_src_addr       
 00000000  __TI_ATRegion0_trg_addr       
@@ -229,44 +425,103 @@ address   name
 00000000  __TI_ATRegion2_region_sz      
 00000000  __TI_ATRegion2_src_addr       
 00000000  __TI_ATRegion2_trg_addr       
-00000860  __TI_CINIT_Base               
-00000870  __TI_CINIT_Limit              
-00000870  __TI_CINIT_Warm               
-0000084c  __TI_Handler_Table_Base       
-00000858  __TI_Handler_Table_Limit      
-000006a1  __TI_auto_init_nobinit_nopinit
-000004d9  __TI_decompress_lzss          
-000007ed  __TI_decompress_none          
+00002968  __TI_CINIT_Base               
+00002978  __TI_CINIT_Limit              
+00002978  __TI_CINIT_Warm               
+00002954  __TI_Handler_Table_Base       
+00002960  __TI_Handler_Table_Limit      
+00001d99  __TI_auto_init_nobinit_nopinit
+00001e49  __TI_cleanup                  
+202014bc  __TI_cleanup_ptr              
+000014b9  __TI_closefile                
+00001535  __TI_decompress_lzss          
+00002565  __TI_decompress_none          
+00001b11  __TI_doflush                  
+202014c0  __TI_dtors_ptr                
+202014c4  __TI_ft_end                   
 ffffffff  __TI_pprof_out_hndl           
+000000c1  __TI_printfi_nofloat          
 ffffffff  __TI_prof_data_size           
 ffffffff  __TI_prof_data_start          
+00001e7d  __TI_readmsg                  
 00000000  __TI_static_base__            
-000007d7  __TI_zero_init_nomemset       
-0000061f  __aeabi_idiv0                 
-00000809  __aeabi_memcpy                
-00000809  __aeabi_memcpy4               
-00000809  __aeabi_memcpy8               
-00000661  __aeabi_uidiv                 
-00000661  __aeabi_uidivmod              
+20201120  __TI_tmpnams                  
+00001eb1  __TI_writemsg                 
+000017cd  __TI_wrt_ok                   
+000024b3  __TI_zero_init_nomemset       
+00002650  __aeabi_ctype_table_          
+00002650  __aeabi_ctype_table_C         
+202014c8  __aeabi_errno                 
+00002605  __aeabi_errno_addr            
+00001257  __aeabi_idiv0                 
+00001953  __aeabi_ldiv0                 
+00002261  __aeabi_llsl                  
+000021b9  __aeabi_lmul                  
+00001425  __aeabi_memclr                
+00001425  __aeabi_memclr4               
+00001425  __aeabi_memclr8               
+0000260d  __aeabi_memcpy                
+0000260d  __aeabi_memcpy4               
+0000260d  __aeabi_memcpy8               
+000025a9  __aeabi_memset                
+000025a9  __aeabi_memset4               
+000025a9  __aeabi_memset8               
+00001cdd  __aeabi_uidiv                 
+00001cdd  __aeabi_uidivmod              
+0000252d  __aeabi_uldivmod              
+00002261  __ashldi3                     
 ffffffff  __binit__                     
 UNDEFED   __mpu_init                    
+000021b9  __muldi3                      
+00001dd5  __muldsi3                     
 20207e00  __stack                       
 20200000  __start___llvm_prf_bits       
 20200000  __start___llvm_prf_cnts       
 20200000  __stop___llvm_prf_bits        
 20200000  __stop___llvm_prf_cnts        
-0000070d  _c_int00_noargs               
+000011b5  __udivmoddi4                  
+00002145  _c_int00_noargs               
+202013b4  _device                       
+202012c4  _ftable                       
+202014cc  _lock                         
+00001b63  _nop                          
+2020142c  _stream                       
+20200000  _sys_memory                   
 UNDEFED   _system_post_cinit            
-00000815  _system_pre_init              
-00000819  abort                         
+0000263d  _system_pre_init              
+202014d0  _unlock                       
+00002641  abort                         
+00000b81  aligned_alloc                 
+00001d1d  atoi                          
 ffffffff  binit                         
-2020009c  gCommand                      
-20200000  gI2C                          
-202000f0  gSendCommand                  
-202000b0  gTxData                       
+00001bb5  close                         
+00001ee5  exit                          
+00001f19  finddevice                    
+00001259  fputc                         
+00000c95  fputs                         
+00000e81  free                          
+00002625  fseek                         
+000016f5  fseeko                        
+202012a4  gCommand                      
+202011c0  gI2C                          
+2020125c  gResponse                     
+202014d4  gSendCommand                  
+2020147c  gTxData                       
+00001761  getdevice                     
 00000000  interruptVectors              
-00000275  main                          
-00000315  memcpy                        
+000020f5  lseek                         
+00001101  main                          
+000025ef  malloc                        
+00000b81  memalign                      
+000021dd  memccpy                       
+202012b8  parmbuf                       
+00001955  printf                        
+0000262d  remove                        
+00000f69  setvbuf                       
+00001431  strcmp                        
+00001fd9  unlink                        
+00002589  wcslen                        
+0000211d  write                         
 
 
 GLOBAL SYMBOLS: SORTED BY Symbol Address 
@@ -284,80 +539,153 @@ address   name
 00000000  __TI_ATRegion2_trg_addr       
 00000000  __TI_static_base__            
 00000000  interruptVectors              
-000000c1  I2C_sendCommand               
+000000c1  __TI_printfi_nofloat          
 00000200  __STACK_SIZE                  
-00000275  main                          
-00000315  memcpy                        
-000003af  ADC0_IRQHandler               
-000003af  ADC1_IRQHandler               
-000003af  AES_IRQHandler                
-000003af  CANFD0_IRQHandler             
-000003af  DAC0_IRQHandler               
-000003af  DMA_IRQHandler                
-000003af  Default_Handler               
-000003af  GROUP0_IRQHandler             
-000003af  GROUP1_IRQHandler             
-000003af  HardFault_Handler             
-000003af  I2C0_IRQHandler               
-000003af  I2C1_IRQHandler               
-000003af  NMI_Handler                   
-000003af  PendSV_Handler                
-000003af  RTC_IRQHandler                
-000003af  SPI0_IRQHandler               
-000003af  SPI1_IRQHandler               
-000003af  SVC_Handler                   
-000003af  SysTick_Handler               
-000003af  TIMA0_IRQHandler              
-000003af  TIMA1_IRQHandler              
-000003af  TIMG0_IRQHandler              
-000003af  TIMG12_IRQHandler             
-000003af  TIMG6_IRQHandler              
-000003af  TIMG7_IRQHandler              
-000003af  TIMG8_IRQHandler              
-000003af  UART0_IRQHandler              
-000003af  UART1_IRQHandler              
-000003af  UART2_IRQHandler              
-000003af  UART3_IRQHandler              
-000003b1  DL_CRC_calculateBlock16       
-00000449  I2C_getResponse               
-000004d9  __TI_decompress_lzss          
-00000555  SYSCFG_DL_I2C_controller_init 
-000005c1  DL_I2C_fillControllerTXFIFO   
-0000061f  __aeabi_idiv0                 
-00000621  SYSCFG_DL_initPower           
-00000661  __aeabi_uidiv                 
-00000661  __aeabi_uidivmod              
-000006a1  __TI_auto_init_nobinit_nopinit
-000006dd  SYSCFG_DL_SYSCTL_init         
-0000070d  _c_int00_noargs               
-00000735  DL_I2C_setClockConfig         
-0000075d  SYSCFG_DL_GPIO_init           
-00000781  SYSCFG_DL_CRC_init            
-000007a1  I2C_init                      
-000007bf  SYSCFG_DL_init                
-000007d7  __TI_zero_init_nomemset       
-000007ed  __TI_decompress_none          
-000007ff  DL_Common_delayCycles         
-00000809  __aeabi_memcpy                
-00000809  __aeabi_memcpy4               
-00000809  __aeabi_memcpy8               
-00000811  Reset_Handler                 
-00000815  _system_pre_init              
-00000818  C$$EXIT                       
-00000819  abort                         
-0000084c  __TI_Handler_Table_Base       
-00000858  __TI_Handler_Table_Limit      
-00000860  __TI_CINIT_Base               
-00000870  __TI_CINIT_Limit              
-00000870  __TI_CINIT_Warm               
+00000929  I2C1_IRQHandler               
+00000a6d  I2C_sendCommand               
+00000b81  aligned_alloc                 
+00000b81  memalign                      
+00000c95  fputs                         
+00000e81  free                          
+00000f69  setvbuf                       
+00001000  __SYSMEM_SIZE                 
+00001049  I2C_decodeResponse            
+00001101  main                          
+000011b5  __udivmoddi4                  
+00001257  __aeabi_idiv0                 
+00001259  fputc                         
+000012f5  DL_CRC_calculateBlock16       
+0000138d  I2C_getResponse               
+00001425  __aeabi_memclr                
+00001425  __aeabi_memclr4               
+00001425  __aeabi_memclr8               
+00001431  strcmp                        
+000014b9  __TI_closefile                
+00001535  __TI_decompress_lzss          
+0000161d  HOSTlseek                     
+00001689  HOSTrename                    
+000016f5  fseeko                        
+00001761  getdevice                     
+000017cd  __TI_wrt_ok                   
+00001895  HOSTopen                      
+000018f5  DL_I2C_fillControllerTXFIFO   
+00001953  __aeabi_ldiv0                 
+00001955  printf                        
+000019b1  HOSTread                      
+00001a09  HOSTwrite                     
+00001a61  SYSCFG_DL_I2C_controller_init 
+00001ab9  SYSCFG_DL_initPower           
+00001b11  __TI_doflush                  
+00001b63  _nop                          
+00001bb5  close                         
+00001c05  HOSTclose                     
+00001c4d  HOSTunlink                    
+00001c95  SYSCFG_DL_GPIO_init           
+00001cdd  __aeabi_uidiv                 
+00001cdd  __aeabi_uidivmod              
+00001d1d  atoi                          
+00001d99  __TI_auto_init_nobinit_nopinit
+00001dd5  __muldsi3                     
+00001e49  __TI_cleanup                  
+00001e7d  __TI_readmsg                  
+00001eb1  __TI_writemsg                 
+00001edd  C$$IO$$                       
+00001ee5  exit                          
+00001f19  finddevice                    
+00001f4d  I2C_init                      
+00001fd9  unlink                        
+000020a5  SYSCFG_DL_CRC_init            
+000020f5  lseek                         
+0000211d  write                         
+00002145  _c_int00_noargs               
+0000216d  DL_I2C_setClockConfig         
+000021b9  __aeabi_lmul                  
+000021b9  __muldi3                      
+000021dd  memccpy                       
+00002241  SYSCFG_DL_SYSCTL_init         
+00002261  __aeabi_llsl                  
+00002261  __ashldi3                     
+00002485  SYSCFG_DL_init                
+000024b3  __TI_zero_init_nomemset       
+0000252d  __aeabi_uldivmod              
+00002553  TI_memcpy_small               
+00002565  __TI_decompress_none          
+00002589  wcslen                        
+000025a9  __aeabi_memset                
+000025a9  __aeabi_memset4               
+000025a9  __aeabi_memset8               
+000025e1  TI_memset_small               
+000025ef  malloc                        
+000025fb  DL_Common_delayCycles         
+00002605  __aeabi_errno_addr            
+0000260d  __aeabi_memcpy                
+0000260d  __aeabi_memcpy4               
+0000260d  __aeabi_memcpy8               
+00002625  fseek                         
+0000262d  remove                        
+00002635  ADC0_IRQHandler               
+00002635  ADC1_IRQHandler               
+00002635  AES_IRQHandler                
+00002635  CANFD0_IRQHandler             
+00002635  DAC0_IRQHandler               
+00002635  DMA_IRQHandler                
+00002635  Default_Handler               
+00002635  GROUP0_IRQHandler             
+00002635  GROUP1_IRQHandler             
+00002635  HardFault_Handler             
+00002635  I2C0_IRQHandler               
+00002635  NMI_Handler                   
+00002635  PendSV_Handler                
+00002635  RTC_IRQHandler                
+00002635  SPI0_IRQHandler               
+00002635  SPI1_IRQHandler               
+00002635  SVC_Handler                   
+00002635  SysTick_Handler               
+00002635  TIMA0_IRQHandler              
+00002635  TIMA1_IRQHandler              
+00002635  TIMG0_IRQHandler              
+00002635  TIMG12_IRQHandler             
+00002635  TIMG6_IRQHandler              
+00002635  TIMG7_IRQHandler              
+00002635  TIMG8_IRQHandler              
+00002635  UART0_IRQHandler              
+00002635  UART1_IRQHandler              
+00002635  UART2_IRQHandler              
+00002635  UART3_IRQHandler              
+00002639  Reset_Handler                 
+0000263d  _system_pre_init              
+00002640  C$$EXIT                       
+00002641  abort                         
+00002650  __aeabi_ctype_table_          
+00002650  __aeabi_ctype_table_C         
+00002954  __TI_Handler_Table_Base       
+00002960  __TI_Handler_Table_Limit      
+00002968  __TI_CINIT_Base               
+00002978  __TI_CINIT_Limit              
+00002978  __TI_CINIT_Warm               
 20200000  __start___llvm_prf_bits       
 20200000  __start___llvm_prf_cnts       
 20200000  __stop___llvm_prf_bits        
 20200000  __stop___llvm_prf_cnts        
-20200000  gI2C                          
-2020009c  gCommand                      
-202000b0  gTxData                       
-202000f0  gSendCommand                  
+20200000  _sys_memory                   
+20201000  _CIOBUF_                      
+20201000  __CIOBUF_                     
+20201120  __TI_tmpnams                  
+202011c0  gI2C                          
+2020125c  gResponse                     
+202012a4  gCommand                      
+202012b8  parmbuf                       
+202012c4  _ftable                       
+202013b4  _device                       
+2020142c  _stream                       
+2020147c  gTxData                       
+202014bc  __TI_cleanup_ptr              
+202014c0  __TI_dtors_ptr                
+202014c4  __TI_ft_end                   
+202014c8  __aeabi_errno                 
+202014cc  _lock                         
+202014d0  _unlock                       
+202014d4  gSendCommand                  
 20207e00  __stack                       
 20208000  __STACK_END                   
 ffffffff  __TI_pprof_out_hndl           
@@ -368,4 +696,4 @@ ffffffff  binit
 UNDEFED   __mpu_init                    
 UNDEFED   _system_post_cinit            
 
-[94 symbols]
+[167 symbols]

二进制
charge_controller_v7/Debug/charge_controller_v7.out


文件差异内容过多而无法显示
+ 4347 - 932
charge_controller_v7/Debug/charge_controller_v7_linkInfo.xml


二进制
charge_controller_v7/Debug/i2c_controller.o


+ 1 - 1
charge_controller_v7/Debug/makefile

@@ -137,7 +137,7 @@ all: $(OBJS) $(GEN_CMDS)
 charge_controller_v7.out: $(OBJS) $(GEN_CMDS)
 	@echo 'Building target: "$@"'
 	@echo 'Invoking: Arm Linker'
-	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -gdwarf-3 -Wl,-m"charge_controller_v7.map" -Wl,-i"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -Wl,-i"/home/ngosh/workspace_ccstheia/charge_controller_v7" -Wl,-i"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug/syscfg" -Wl,-i"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib" -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="charge_controller_v7_linkInfo.xml" -Wl,--rom_model -o "charge_controller_v7.out" $(ORDERED_OBJS)
+	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -gdwarf-3 -Wl,-m"charge_controller_v7.map" -Wl,--heap_size=0x1000 -Wl,-i"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -Wl,-i"/home/ngosh/workspace_ccstheia/charge_controller_v7" -Wl,-i"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug/syscfg" -Wl,-i"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib" -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="charge_controller_v7_linkInfo.xml" -Wl,--rom_model -o "charge_controller_v7.out" $(ORDERED_OBJS)
 	@echo 'Finished building target: "$@"'
 	@echo ' '
 

二进制
charge_controller_v7/Debug/startup_mspm0g350x_ticlang.o


+ 3 - 3
charge_controller_v7/Debug/subdir_rules.mk

@@ -6,7 +6,7 @@
 %.o: ../%.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
 	@echo 'Building file: "$<"'
 	@echo 'Invoking: Arm Compiler'
-	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
+	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
 	@echo 'Finished building: "$<"'
 	@echo ' '
 
@@ -26,14 +26,14 @@ ti_msp_dl_config.h: build-1016228703
 %.o: ./%.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
 	@echo 'Building file: "$<"'
 	@echo 'Invoking: Arm Compiler'
-	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
+	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
 	@echo 'Finished building: "$<"'
 	@echo ' '
 
 startup_mspm0g350x_ticlang.o: /home/ngosh/ti/mspm0_sdk_2_03_00_07/source/ti/devices/msp/m0p/startup_system_files/ticlang/startup_mspm0g350x_ticlang.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
 	@echo 'Building file: "$<"'
 	@echo 'Invoking: Arm Compiler'
-	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
+	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
 	@echo 'Finished building: "$<"'
 	@echo ' '
 

二进制
charge_controller_v7/Debug/ti/comm_modules/i2c/controller/i2c_comm_controller.o


+ 1 - 1
charge_controller_v7/Debug/ti/comm_modules/i2c/controller/subdir_rules.mk

@@ -6,7 +6,7 @@
 ti/comm_modules/i2c/controller/%.o: ../ti/comm_modules/i2c/controller/%.c $(GEN_OPTS) | $(GEN_FILES) $(GEN_MISC_FILES)
 	@echo 'Building file: "$<"'
 	@echo 'Invoking: Arm Compiler'
-	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O2 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"ti/comm_modules/i2c/controller/$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
+	"/home/ngosh/ti/ccstheia151/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang" -c @"device.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -I"/home/ngosh/workspace_ccstheia/charge_controller_v7" -I"/home/ngosh/workspace_ccstheia/charge_controller_v7/Debug" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source/third_party/CMSIS/Core/Include" -I"/home/ngosh/ti/mspm0_sdk_2_03_00_07/source" -gdwarf-3 -MMD -MP -MF"ti/comm_modules/i2c/controller/$(basename $(<F)).d_raw" -MT"$(@)"  $(GEN_OPTS__FLAG) -o"$@" "$(shell echo $<)"
 	@echo 'Finished building: "$<"'
 	@echo ' '
 

+ 3 - 3
charge_controller_v7/Debug/ti_msp_dl_config.h

@@ -84,10 +84,10 @@ extern "C" {
 #define I2C_controller_INST_IRQHandler                           I2C1_IRQHandler
 #define I2C_controller_INST_INT_IRQN                               I2C1_INT_IRQn
 #define I2C_controller_BUS_SPEED_HZ                                       100000
-#define GPIO_I2C_controller_SDA_PORT                                       GPIOA
+#define GPIO_I2C_controller_SDA_PORT                                       GPIOB
 #define GPIO_I2C_controller_SDA_PIN                                DL_GPIO_PIN_3
-#define GPIO_I2C_controller_IOMUX_SDA                             (IOMUX_PINCM8)
-#define GPIO_I2C_controller_IOMUX_SDA_FUNC                IOMUX_PINCM8_PF_I2C1_SDA
+#define GPIO_I2C_controller_IOMUX_SDA                            (IOMUX_PINCM16)
+#define GPIO_I2C_controller_IOMUX_SDA_FUNC               IOMUX_PINCM16_PF_I2C1_SDA
 #define GPIO_I2C_controller_SCL_PORT                                       GPIOB
 #define GPIO_I2C_controller_SCL_PIN                                DL_GPIO_PIN_2
 #define GPIO_I2C_controller_IOMUX_SCL                            (IOMUX_PINCM15)

二进制
charge_controller_v7/Debug/ti_msp_dl_config.o


+ 15 - 8
charge_controller_v7/i2c_controller.c

@@ -33,6 +33,8 @@
 
 #include "ti_msp_dl_config.h"
 #include "ti/comm_modules/i2c/controller/i2c_comm_controller.h"
+#include<stdint.h>
+#include<stdio.h>
 
 I2C_Instance gI2C;
 
@@ -40,7 +42,7 @@ volatile I2C_CommandInfo gCommand;
 
 I2C_ResponseInfo gResponse;
 
-volatile bool gSendCommand = false;
+volatile bool gSendCommand = true;
 
 /* Data to send to target */
 uint8_t gTxData[MAX_DATA_SIZE] = {0xAA,0xBB,0xCC,0xDD,0xEE,0xFF, \
@@ -52,6 +54,8 @@ int main(void)
 {
     SYSCFG_DL_init();
 
+    printf("System Configuration Enabled\n");
+
     NVIC_EnableIRQ(I2C_controller_INST_INT_IRQN);
 
     I2C_init(&gI2C);
@@ -63,31 +67,31 @@ int main(void)
     CommandInfo_Obj.commandType = READ_COMMAND;
     CommandInfo_Obj.addr = 0x20207C00;
     CommandInfo_Obj.dataArray = &gTxData[0];
-    CommandInfo_Obj.dataSize = 4;
+    CommandInfo_Obj.dataSize = 0;
     CommandInfo_Obj.crcEnable = false;
 
     gCommand = CommandInfo_Obj;
 
     while(1)
     {
-        if(gSendCommand == true)
+        if(gSendCommand)
         {
             /* Frames a command packet and sends it to Target through I2C Write Command */
             I2C_sendCommand(&gI2C, (I2C_CommandInfo *) &gCommand);
-
+            printf("Sending data to I2C address: 0x%X\n", gCommand.targetAddr);
             gI2C.status = I2C_STATUS_RX_STARTED;
             gI2C.rxMsg.ptr = 0;
-
+            gI2C.dataLen = 4;
             /* Issues I2C Read Command to get the response from Target */
             I2C_getResponse(&gI2C,gCommand.targetAddr);
-
+            printf("Reading data to I2C address: 0x%X\n", gCommand.targetAddr);
             gSendCommand = false;
         }
     }
 }
 
-void I2C_INST_IRQHandler(void)
-{
+void I2C_controller_INST_IRQHandler(void)
+{   printf("I2C Interrupt Triggered!\n");
     switch (DL_I2C_getPendingInterrupt(I2C_controller_INST)) 
     {
         case DL_I2C_IIDX_CONTROLLER_RX_DONE:
@@ -117,6 +121,7 @@ void I2C_INST_IRQHandler(void)
             break;
 
         case DL_I2C_IIDX_CONTROLLER_TXFIFO_TRIGGER:
+            printf("TX FIFO with data!\n"); 
             gI2C.status = I2C_STATUS_TX_INPROGRESS;
             /* Fill TX FIFO with bytes to send */
             if (gI2C.txMsg.ptr < gI2C.txMsg.len) {
@@ -126,7 +131,9 @@ void I2C_INST_IRQHandler(void)
             break;
 
         case DL_I2C_IIDX_CONTROLLER_ARBITRATION_LOST:
+            printf("Interrupt index for I2C controller Arbitration Lost!\n");
         case DL_I2C_IIDX_CONTROLLER_NACK:
+            printf("Interrupt index for Address/Data NACK!\n");
             gI2C.status = I2C_STATUS_ERROR;
             break; 
         default:

+ 1 - 1
charge_controller_v7/i2c_controller.syscfg

@@ -26,7 +26,7 @@ I2C1.advControllerTXFIFOTRIG           = "BYTES_1";
 I2C1.advAnalogGlitchFilter             = "DISABLED";
 I2C1.intController                     = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TX_DONE"];
 I2C1.$name                             = "I2C_controller";
-I2C1.peripheral.sdaPin.$assign         = "PA3";
+I2C1.peripheral.sdaPin.$assign         = "PB3";
 I2C1.peripheral.sclPin.$assign         = "PB2";
 I2C1.sdaPinConfig.$name                = "ti_driverlib_gpio_GPIOPinGeneric0";
 I2C1.sdaPinConfig.hideOutputInversion  = scripting.forceWrite(false);

+ 44 - 4
charge_controller_v7/ti/comm_modules/i2c/controller/i2c_comm_controller.c

@@ -31,6 +31,8 @@
  */
 
 #include "i2c_comm_controller.h"
+#include <stdio.h>
+#include<stdint.h>
 
 #define LEFT_SHIFT_8(x)     ((x) << 8)
 #define RIGHT_SHIFT_8(x)    ((x) >> 8)
@@ -153,7 +155,13 @@ __STATIC_INLINE void I2C_clearBuffer(BufferInfo *frame)
     frame->ptr = 0;
     frame->len = 0;
 }
-
+/*Initialize the I2C instance structure:
+* Clears the Receive and Tramnsmit Buffer
+* Resets data length to 0
+* Disables CRC
+* Sets the initial I2C status to IDLE
+* Resets Error Status
+*/
 void I2C_init(I2C_Instance *I2C_handle)
 {
     I2C_clearBuffer(&I2C_handle->rxMsg);
@@ -165,8 +173,19 @@ void I2C_init(I2C_Instance *I2C_handle)
     I2C_handle->error = ERROR_TYPE_NONE;
 }
 
+/*
+Send I2C command:
+* Resets the transmit buffer to 0: Prepares for new data
+* (command->commandType): Specifies whether the command is READ or WRITE
+* (command->crcEnable ? CRC_MASK : (0x00)): Adds a CRC FLag if enabled
+* ((command->dataSize - 1) & LEN_MASK) : encodes the data size in control byte
+* I2C_handle->txMsg.ptr += 4 -> moves the pointer forward 4 bytes (since address is 32 bits)
+* READ operation expects dataSize
+* Loops through the command array and stores it to the buffer.
+* I2C_handle->txMsg.len = I2C_handle->txMsg.ptr -> final length of the TX message
+*/
 void I2C_sendCommand(I2C_Instance *I2C_handle,I2C_CommandInfo *command)
-{
+{  
     /* Prepare TX Buffer */
     I2C_handle->txMsg.ptr = 0;
 
@@ -211,6 +230,7 @@ void I2C_sendCommand(I2C_Instance *I2C_handle,I2C_CommandInfo *command)
         ;
 }
 
+
 static void I2C_sendBuffer(I2C_Instance *I2C_handle,uint8_t targetAddr)
 {
     I2C_handle->txMsg.ptr = 0;
@@ -242,6 +262,7 @@ static void I2C_sendBuffer(I2C_Instance *I2C_handle,uint8_t targetAddr)
     /* Wait until the Controller sends all bytes */
     while ((I2C_handle->status != I2C_STATUS_TX_COMPLETE) &&
             (I2C_handle->status != I2C_STATUS_ERROR)) {
+        printf("Wait till the bus is idle");
         __WFE();
     }
 
@@ -253,13 +274,32 @@ static void I2C_sendBuffer(I2C_Instance *I2C_handle,uint8_t targetAddr)
     /* Trap if there was an error */
     if (DL_I2C_getControllerStatus(I2C_controller_INST) &
         DL_I2C_CONTROLLER_STATUS_ERROR) {
+        //Testing for error trap:
+        uint32_t status = DL_I2C_getControllerStatus(I2C_controller_INST);
+        printf("I2C ERROR: Controller status = 0x%X\n", status);
         __BKPT(0);
     }
 }
 
-
+/*
+This function returns and receives the data from the I2C peripheral.
+The total expected length of the response is calculated as:
+* CTRL_SIZE: The control byte size
+* I2C_handle->dataLen: The data length that is expected in response
+* (I2C_handle->isCrc ? CRC_SIZE : 0) : if the CRC checking is enabled, add the CRC_Size to the expected length
+* Calls DL_I2C_startControllerTransfer to start an I2C read transaction.
+    * I2C_controller_INST: Reference to the the I2C controller instance
+    * targetAddr: I2C address of the device
+    * DL_I2C_CONTROLLER_DIRECTION_RX: indicates this is a READ operation
+    * expectedLen: The no. of bytes expected in the response
+* Waits until data reception is complete
+* Retries if a NACK error occurs
+* Wait for the bus to become idle.
+*/
 void I2C_getResponse(I2C_Instance* I2C_handle,uint32_t targetAddr)
-{
+{   
+    printf("Receiving data from I2C address\n");
+
     uint32_t expectedLen = CTRL_SIZE + I2C_handle->dataLen + (I2C_handle->isCrc ? CRC_SIZE : 0);
 
     DL_I2C_startControllerTransfer(

部分文件因为文件数量过多而无法显示