Browse Source

ADC working

Victor 1 năm trước cách đây
mục cha
commit
c3a5164aed

+ 9 - 0
.theia/launch.json

@@ -36,6 +36,15 @@
                 "name": "adc_to_uart_LP_MSPM0G3507_nortos_ticlang",
                 "resourceId": "/adc_to_uart_LP_MSPM0G3507_nortos_ticlang/adc_to_uart.syscfg"
             }
+        },
+        {
+            "name": "gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang (2)",
+            "type": "ccs-debug",
+            "request": "launch",
+            "projectInfo": {
+                "name": "gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang",
+                "resourceId": "/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/README.md"
+            }
         }
     ]
 }

BIN
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/.clangd/.cache/clangd/index/gpio_toggle_output.c.4F72BB60BC1C9FF1.idx


BIN
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/.clangd/.cache/clangd/index/ti_msp_dl_config.c.E581B87DABE000D3.idx


BIN
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output.o


+ 223 - 207
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.map

@@ -1,18 +1,18 @@
 ******************************************************************************
             TI ARM Clang Linker Unix v4.0.0                    
 ******************************************************************************
->> Linked Wed Oct  2 15:18:59 2024
+>> Linked Wed Oct  2 17:26:40 2024
 
 OUTPUT FILE NAME:   <gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out>
-ENTRY POINT SYMBOL: "_c_int00_noargs"  address: 000006ad
+ENTRY POINT SYMBOL: "_c_int00_noargs"  address: 0000076d
 
 
 MEMORY CONFIGURATION
 
          name            origin    length      used     unused   attr    fill
 ----------------------  --------  ---------  --------  --------  ----  --------
-  FLASH                 00000000   00020000  00000860  0001f7a0  R  X
-  SRAM                  20200000   00008000  00000236  00007dca  RW X
+  FLASH                 00000000   00020000  00000948  0001f6b8  R  X
+  SRAM                  20200000   00008000  000002a6  00007d5a  RW X
   BCR_CONFIG            41c00000   00000080  00000000  00000080  R   
   BSL_CONFIG            41c00100   00000080  00000000  00000080  R   
 
@@ -21,14 +21,14 @@ SEGMENT ALLOCATION MAP
 
 run origin  load origin   length   init length attrs members
 ----------  ----------- ---------- ----------- ----- -------
-00000000    00000000    00000860   00000860    r-x
+00000000    00000000    00000948   00000948    r-x
   00000000    00000000    000000c0   000000c0    r-- .intvecs
-  000000c0    000000c0    00000730   00000730    r-x .text
-  000007f0    000007f0    00000040   00000040    r-- .rodata
-  00000830    00000830    00000030   00000030    r-- .cinit
-20200000    20200000    00000036   00000000    rw-
-  20200000    20200000    00000030   00000000    rw- .bss
-  20200030    20200030    00000006   00000000    rw- .data
+  000000c0    000000c0    000007f0   000007f0    r-x .text
+  000008b0    000008b0    00000040   00000040    r-- .rodata
+  000008f0    000008f0    00000058   00000058    r-- .cinit
+20200000    20200000    000000a8   00000000    rw-
+  20200000    20200000    00000076   00000000    rw- .data
+  20200078    20200078    00000030   00000000    rw- .bss
 20207e00    20207e00    00000200   00000000    rw-
   20207e00    20207e00    00000200   00000000    rw- .stack
 
@@ -41,69 +41,75 @@ section   page    origin      length       input sections
 .intvecs   0    00000000    000000c0     
                   00000000    000000c0     startup_mspm0g350x_ticlang.o (.intvecs)
 
-.text      0    000000c0    00000730     
-                  000000c0    000000ec     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_configSYSPLL)
-                  000001ac    000000d4     gpio_toggle_output.o (.text.main)
-                  00000280    0000009a     libc.a : memcpy16.S.obj (.text:memcpy)
-                  0000031a    00000002     startup_mspm0g350x_ticlang.o (.text.Default_Handler)
-                  0000031c    0000007c     libc.a : copy_decompress_lzss.c.obj (.text:decompress:lzss)
-                  00000398    00000064     ti_msp_dl_config.o (.text.SYSCFG_DL_UART_3_init)
-                  000003fc    00000058     ti_msp_dl_config.o (.text.SYSCFG_DL_SYSCTL_init)
-                  00000454    0000004c     driverlib.a : dl_adc12.o (.text.DL_ADC12_setClockConfig)
-                  000004a0    0000004c                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK)
-                  000004ec    0000004c                 : dl_uart.o (.text.DL_UART_init)
-                  00000538    0000004c     ti_msp_dl_config.o (.text.SYSCFG_DL_current_analog_init)
-                  00000584    00000040     ti_msp_dl_config.o (.text.SYSCFG_DL_GPIO_init)
-                  000005c4    0000003c     libc.a : autoinit.c.obj (.text:__TI_auto_init_nobinit_nopinit)
-                  00000600    00000034     ti_msp_dl_config.o (.text.SYSCFG_DL_initPower)
-                  00000634    00000028     driverlib.a : dl_adc12.o (.text.DL_Common_updateReg)
-                  0000065c    00000028                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_Common_updateReg)
-                  00000684    00000028                 : dl_uart.o (.text.DL_Common_updateReg)
-                  000006ac    00000028     libc.a : boot_cortex_m.c.obj (.text:_c_int00_noargs)
-                  000006d4    00000024     driverlib.a : dl_uart.o (.text.DL_UART_setClockConfig)
-                  000006f8    00000024     ti_msp_dl_config.o (.text.SYSCFG_DL_init)
-                  0000071c    00000020     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_CORE_configInstruction)
-                  0000073c    00000018                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_setHSCLKSource)
-                  00000754    00000016                 : dl_uart.o (.text.DL_UART_disable)
-                  0000076a    00000016     libc.a : copy_zero_init.c.obj (.text:decompress:ZI:__TI_zero_init_nomemset)
-                  00000780    00000014     driverlib.a : dl_common.o (.text.DL_Common_delayCycles)
-                  00000794    00000014                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_disableSYSPLL)
-                  000007a8    00000012     libc.a : copy_decompress_none.c.obj (.text:decompress:none)
-                  000007ba    00000002     --HOLE-- [fill = 0]
-                  000007bc    00000010     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_CORE_getInstructionConfig)
-                  000007cc    0000000c                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_getClockStatus)
-                  000007d8    00000008     libclang_rt.builtins.a : aeabi_memcpy.S.obj (.text.__aeabi_memcpy)
-                  000007e0    00000004     startup_mspm0g350x_ticlang.o (.text.Reset_Handler)
-                  000007e4    00000004     libc.a : pre_init.c.obj (.text._system_pre_init)
-                  000007e8    00000004            : exit.c.obj (.text:abort)
-                  000007ec    00000004     --HOLE-- [fill = 0]
-
-.cinit     0    00000830    00000030     
-                  00000830    0000000c     (__TI_handler_table)
-                  0000083c    0000000a     (.cinit..data.load) [load image, compression = lzss]
-                  00000846    00000002     --HOLE-- [fill = 0]
-                  00000848    00000008     (.cinit..bss.load) [load image, compression = zero_init]
-                  00000850    00000010     (__TI_cinit_table)
-
-.rodata    0    000007f0    00000040     
-                  000007f0    00000028     ti_msp_dl_config.o (.rodata.gSYSPLLConfig)
-                  00000818    0000000a     ti_msp_dl_config.o (.rodata.gUART_3Config)
-                  00000822    00000002     ti_msp_dl_config.o (.rodata.gUART_3ClockConfig)
-                  00000824    00000008     ti_msp_dl_config.o (.rodata.gcurrent_analogClockConfig)
-                  0000082c    00000004     --HOLE-- [fill = 0]
+.text      0    000000c0    000007f0     
+                  000000c0    00000178     gpio_toggle_output.o (.text.main)
+                  00000238    000000ec     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_configSYSPLL)
+                  00000324    0000009a     libc.a : memcpy16.S.obj (.text:memcpy)
+                  000003be    00000002     startup_mspm0g350x_ticlang.o (.text.Default_Handler)
+                  000003c0    0000007c     libc.a : copy_decompress_lzss.c.obj (.text:decompress:lzss)
+                  0000043c    00000068     ti_msp_dl_config.o (.text.SYSCFG_DL_current_analog_init)
+                  000004a4    00000064     ti_msp_dl_config.o (.text.SYSCFG_DL_UART_3_init)
+                  00000508    00000058     ti_msp_dl_config.o (.text.SYSCFG_DL_SYSCTL_init)
+                  00000560    0000004c     driverlib.a : dl_adc12.o (.text.DL_ADC12_setClockConfig)
+                  000005ac    0000004c                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK)
+                  000005f8    0000004c                 : dl_uart.o (.text.DL_UART_init)
+                  00000644    00000040     ti_msp_dl_config.o (.text.SYSCFG_DL_GPIO_init)
+                  00000684    0000003c     libc.a : autoinit.c.obj (.text:__TI_auto_init_nobinit_nopinit)
+                  000006c0    00000034     ti_msp_dl_config.o (.text.SYSCFG_DL_initPower)
+                  000006f4    00000028     driverlib.a : dl_adc12.o (.text.DL_Common_updateReg)
+                  0000071c    00000028                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_Common_updateReg)
+                  00000744    00000028                 : dl_uart.o (.text.DL_Common_updateReg)
+                  0000076c    00000028     libc.a : boot_cortex_m.c.obj (.text:_c_int00_noargs)
+                  00000794    00000024     driverlib.a : dl_uart.o (.text.DL_UART_setClockConfig)
+                  000007b8    00000024     ti_msp_dl_config.o (.text.SYSCFG_DL_init)
+                  000007dc    00000020     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_CORE_configInstruction)
+                  000007fc    00000018                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_setHSCLKSource)
+                  00000814    00000016                 : dl_uart.o (.text.DL_UART_disable)
+                  0000082a    00000016     libc.a : copy_zero_init.c.obj (.text:decompress:ZI:__TI_zero_init_nomemset)
+                  00000840    00000014     driverlib.a : dl_common.o (.text.DL_Common_delayCycles)
+                  00000854    00000014                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_disableSYSPLL)
+                  00000868    00000012     libc.a : copy_decompress_none.c.obj (.text:decompress:none)
+                  0000087a    00000002     --HOLE-- [fill = 0]
+                  0000087c    00000010     driverlib.a : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_CORE_getInstructionConfig)
+                  0000088c    0000000c                 : dl_sysctl_mspm0g1x0x_g3x0x.o (.text.DL_SYSCTL_getClockStatus)
+                  00000898    00000008     libclang_rt.builtins.a : aeabi_memcpy.S.obj (.text.__aeabi_memcpy)
+                  000008a0    00000004     startup_mspm0g350x_ticlang.o (.text.Reset_Handler)
+                  000008a4    00000004     libc.a : pre_init.c.obj (.text._system_pre_init)
+                  000008a8    00000004            : exit.c.obj (.text:abort)
+                  000008ac    00000004     --HOLE-- [fill = 0]
+
+.cinit     0    000008f0    00000058     
+                  000008f0    0000002f     (.cinit..data.load) [load image, compression = lzss]
+                  0000091f    00000001     --HOLE-- [fill = 0]
+                  00000920    0000000c     (__TI_handler_table)
+                  0000092c    00000008     (.cinit..bss.load) [load image, compression = zero_init]
+                  00000934    00000010     (__TI_cinit_table)
+                  00000944    00000004     --HOLE-- [fill = 0]
+
+.rodata    0    000008b0    00000040     
+                  000008b0    00000028     ti_msp_dl_config.o (.rodata.gSYSPLLConfig)
+                  000008d8    0000000a     ti_msp_dl_config.o (.rodata.gUART_3Config)
+                  000008e2    00000002     ti_msp_dl_config.o (.rodata.gUART_3ClockConfig)
+                  000008e4    00000008     ti_msp_dl_config.o (.rodata.gcurrent_analogClockConfig)
+                  000008ec    00000004     --HOLE-- [fill = 0]
 
 .init_array 
 *          0    00000000    00000000     UNINITIALIZED
 
 .binit     0    00000000    00000000     
 
-.bss       0    20200000    00000030     UNINITIALIZED
-                  20200000    00000030     (.common:gUART_3Backup)
+.data      0    20200000    00000076     UNINITIALIZED
+                  20200000    00000020     gpio_toggle_output.o (.data.INACellNumeration)
+                  20200020    00000020     gpio_toggle_output.o (.data.adc_value0)
+                  20200040    00000020     gpio_toggle_output.o (.data.adc_value1)
+                  20200060    0000000c     gpio_toggle_output.o (.data.muxSetPins)
+                  2020006c    00000004     gpio_toggle_output.o (.data.UIMuxEnablePin)
+                  20200070    00000004     gpio_toggle_output.o (.data.i)
+                  20200074    00000001     gpio_toggle_output.o (.data.HIGH)
+                  20200075    00000001     gpio_toggle_output.o (.data.LOW)
 
-.data      0    20200030    00000006     UNINITIALIZED
-                  20200030    00000004     gpio_toggle_output.o (.data.UIMuxEnablePin)
-                  20200034    00000001     gpio_toggle_output.o (.data.HIGH)
-                  20200035    00000001     gpio_toggle_output.o (.data.LOW)
+.bss       0    20200078    00000030     UNINITIALIZED
+                  20200078    00000030     (.common:gUART_3Backup)
 
 .stack     0    20207e00    00000200     UNINITIALIZED
                   20207e00    00000004     libc.a : boot_cortex_m.c.obj (.stack)
@@ -120,11 +126,11 @@ MODULE SUMMARY
        Module                         code   ro data   rw data
        ------                         ----   -------   -------
     ./
-       ti_msp_dl_config.o             416    60        48     
-       gpio_toggle_output.o           212    0         6      
+       ti_msp_dl_config.o             444    60        48     
+       gpio_toggle_output.o           376    0         118    
        startup_mspm0g350x_ticlang.o   6      192       0      
     +--+------------------------------+------+---------+---------+
-       Total:                         634    252       54     
+       Total:                         826    252       166    
                                                               
     /home/vturban/ti/ccstheia150/ccs/tools/compiler/ti-cgt-armllvm_4.0.0.LTS/lib/armv6m-ti-none-eabi/c/libc.a
        memcpy16.S.obj                 154    0         0      
@@ -152,21 +158,21 @@ MODULE SUMMARY
        Total:                         766    0         0      
                                                               
        Stack:                         0      0         512    
-       Linker Generated:              0      46        0      
+       Linker Generated:              0      83        0      
     +--+------------------------------+------+---------+---------+
-       Grand Total:                   1834   298       566    
+       Grand Total:                   2026   335       678    
 
 
 LINKER GENERATED COPY TABLES
 
-__TI_cinit_table @ 00000850 records: 2, size/record: 8, table size: 16
-	.data: load addr=0000083c, load size=0000000a bytes, run addr=20200030, run size=00000006 bytes, compression=lzss
-	.bss: load addr=00000848, load size=00000008 bytes, run addr=20200000, run size=00000030 bytes, compression=zero_init
+__TI_cinit_table @ 00000934 records: 2, size/record: 8, table size: 16
+	.data: load addr=000008f0, load size=0000002f bytes, run addr=20200000, run size=00000076 bytes, compression=lzss
+	.bss: load addr=0000092c, load size=00000008 bytes, run addr=20200078, run size=00000030 bytes, compression=zero_init
 
 
 LINKER GENERATED HANDLER TABLE
 
-__TI_handler_table @ 00000830 records: 3, size/record: 4, table size: 12
+__TI_handler_table @ 00000920 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
@@ -176,53 +182,54 @@ GLOBAL SYMBOLS: SORTED ALPHABETICALLY BY Name
 
 address   name                                 
 -------   ----                                 
-0000031b  ADC0_IRQHandler                      
-0000031b  ADC1_IRQHandler                      
-0000031b  AES_IRQHandler                       
-000007e8  C$$EXIT                              
-0000031b  CANFD0_IRQHandler                    
-0000031b  DAC0_IRQHandler                      
-00000455  DL_ADC12_setClockConfig              
-00000781  DL_Common_delayCycles                
-000000c1  DL_SYSCTL_configSYSPLL               
-000004a1  DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK
-000004ed  DL_UART_init                         
-000006d5  DL_UART_setClockConfig               
-0000031b  DMA_IRQHandler                       
-0000031b  Default_Handler                      
-0000031b  GROUP0_IRQHandler                    
-0000031b  GROUP1_IRQHandler                    
-20200034  HIGH                                 
-0000031b  HardFault_Handler                    
-0000031b  I2C0_IRQHandler                      
-0000031b  I2C1_IRQHandler                      
-20200035  LOW                                  
-0000031b  NMI_Handler                          
-0000031b  PendSV_Handler                       
-0000031b  RTC_IRQHandler                       
-000007e1  Reset_Handler                        
-0000031b  SPI0_IRQHandler                      
-0000031b  SPI1_IRQHandler                      
-0000031b  SVC_Handler                          
-00000585  SYSCFG_DL_GPIO_init                  
-000003fd  SYSCFG_DL_SYSCTL_init                
-00000399  SYSCFG_DL_UART_3_init                
-00000539  SYSCFG_DL_current_analog_init        
-000006f9  SYSCFG_DL_init                       
-00000601  SYSCFG_DL_initPower                  
-0000031b  SysTick_Handler                      
-0000031b  TIMA0_IRQHandler                     
-0000031b  TIMA1_IRQHandler                     
-0000031b  TIMG0_IRQHandler                     
-0000031b  TIMG12_IRQHandler                    
-0000031b  TIMG6_IRQHandler                     
-0000031b  TIMG7_IRQHandler                     
-0000031b  TIMG8_IRQHandler                     
-0000031b  UART0_IRQHandler                     
-0000031b  UART1_IRQHandler                     
-0000031b  UART2_IRQHandler                     
-0000031b  UART3_IRQHandler                     
-20200030  UIMuxEnablePin                       
+000003bf  ADC0_IRQHandler                      
+000003bf  ADC1_IRQHandler                      
+000003bf  AES_IRQHandler                       
+000008a8  C$$EXIT                              
+000003bf  CANFD0_IRQHandler                    
+000003bf  DAC0_IRQHandler                      
+00000561  DL_ADC12_setClockConfig              
+00000841  DL_Common_delayCycles                
+00000239  DL_SYSCTL_configSYSPLL               
+000005ad  DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK
+000005f9  DL_UART_init                         
+00000795  DL_UART_setClockConfig               
+000003bf  DMA_IRQHandler                       
+000003bf  Default_Handler                      
+000003bf  GROUP0_IRQHandler                    
+000003bf  GROUP1_IRQHandler                    
+20200074  HIGH                                 
+000003bf  HardFault_Handler                    
+000003bf  I2C0_IRQHandler                      
+000003bf  I2C1_IRQHandler                      
+20200000  INACellNumeration                    
+20200075  LOW                                  
+000003bf  NMI_Handler                          
+000003bf  PendSV_Handler                       
+000003bf  RTC_IRQHandler                       
+000008a1  Reset_Handler                        
+000003bf  SPI0_IRQHandler                      
+000003bf  SPI1_IRQHandler                      
+000003bf  SVC_Handler                          
+00000645  SYSCFG_DL_GPIO_init                  
+00000509  SYSCFG_DL_SYSCTL_init                
+000004a5  SYSCFG_DL_UART_3_init                
+0000043d  SYSCFG_DL_current_analog_init        
+000007b9  SYSCFG_DL_init                       
+000006c1  SYSCFG_DL_initPower                  
+000003bf  SysTick_Handler                      
+000003bf  TIMA0_IRQHandler                     
+000003bf  TIMA1_IRQHandler                     
+000003bf  TIMG0_IRQHandler                     
+000003bf  TIMG12_IRQHandler                    
+000003bf  TIMG6_IRQHandler                     
+000003bf  TIMG7_IRQHandler                     
+000003bf  TIMG8_IRQHandler                     
+000003bf  UART0_IRQHandler                     
+000003bf  UART1_IRQHandler                     
+000003bf  UART2_IRQHandler                     
+000003bf  UART3_IRQHandler                     
+2020006c  UIMuxEnablePin                       
 20208000  __STACK_END                          
 00000200  __STACK_SIZE                         
 00000000  __TI_ATRegion0_region_sz             
@@ -234,22 +241,22 @@ address   name
 00000000  __TI_ATRegion2_region_sz             
 00000000  __TI_ATRegion2_src_addr              
 00000000  __TI_ATRegion2_trg_addr              
-00000850  __TI_CINIT_Base                      
-00000860  __TI_CINIT_Limit                     
-00000860  __TI_CINIT_Warm                      
-00000830  __TI_Handler_Table_Base              
-0000083c  __TI_Handler_Table_Limit             
-000005c5  __TI_auto_init_nobinit_nopinit       
-0000031d  __TI_decompress_lzss                 
-000007a9  __TI_decompress_none                 
+00000934  __TI_CINIT_Base                      
+00000944  __TI_CINIT_Limit                     
+00000944  __TI_CINIT_Warm                      
+00000920  __TI_Handler_Table_Base              
+0000092c  __TI_Handler_Table_Limit             
+00000685  __TI_auto_init_nobinit_nopinit       
+000003c1  __TI_decompress_lzss                 
+00000869  __TI_decompress_none                 
 ffffffff  __TI_pprof_out_hndl                  
 ffffffff  __TI_prof_data_size                  
 ffffffff  __TI_prof_data_start                 
 00000000  __TI_static_base__                   
-0000076b  __TI_zero_init_nomemset              
-000007d9  __aeabi_memcpy                       
-000007d9  __aeabi_memcpy4                      
-000007d9  __aeabi_memcpy8                      
+0000082b  __TI_zero_init_nomemset              
+00000899  __aeabi_memcpy                       
+00000899  __aeabi_memcpy4                      
+00000899  __aeabi_memcpy8                      
 ffffffff  __binit__                            
 UNDEFED   __mpu_init                           
 20207e00  __stack                              
@@ -257,15 +264,19 @@ UNDEFED   __mpu_init
 20200000  __start___llvm_prf_cnts              
 20200000  __stop___llvm_prf_bits               
 20200000  __stop___llvm_prf_cnts               
-000006ad  _c_int00_noargs                      
+0000076d  _c_int00_noargs                      
 UNDEFED   _system_post_cinit                   
-000007e5  _system_pre_init                     
-000007e9  abort                                
+000008a5  _system_pre_init                     
+000008a9  abort                                
+20200020  adc_value0                           
+20200040  adc_value1                           
 ffffffff  binit                                
-20200000  gUART_3Backup                        
+20200078  gUART_3Backup                        
+20200070  i                                    
 00000000  interruptVectors                     
-000001ad  main                                 
-00000281  memcpy                               
+000000c1  main                                 
+00000325  memcpy                               
+20200060  muxSetPins                           
 
 
 GLOBAL SYMBOLS: SORTED BY Symbol Address 
@@ -283,76 +294,81 @@ address   name
 00000000  __TI_ATRegion2_trg_addr              
 00000000  __TI_static_base__                   
 00000000  interruptVectors                     
-000000c1  DL_SYSCTL_configSYSPLL               
-000001ad  main                                 
+000000c1  main                                 
 00000200  __STACK_SIZE                         
-00000281  memcpy                               
-0000031b  ADC0_IRQHandler                      
-0000031b  ADC1_IRQHandler                      
-0000031b  AES_IRQHandler                       
-0000031b  CANFD0_IRQHandler                    
-0000031b  DAC0_IRQHandler                      
-0000031b  DMA_IRQHandler                       
-0000031b  Default_Handler                      
-0000031b  GROUP0_IRQHandler                    
-0000031b  GROUP1_IRQHandler                    
-0000031b  HardFault_Handler                    
-0000031b  I2C0_IRQHandler                      
-0000031b  I2C1_IRQHandler                      
-0000031b  NMI_Handler                          
-0000031b  PendSV_Handler                       
-0000031b  RTC_IRQHandler                       
-0000031b  SPI0_IRQHandler                      
-0000031b  SPI1_IRQHandler                      
-0000031b  SVC_Handler                          
-0000031b  SysTick_Handler                      
-0000031b  TIMA0_IRQHandler                     
-0000031b  TIMA1_IRQHandler                     
-0000031b  TIMG0_IRQHandler                     
-0000031b  TIMG12_IRQHandler                    
-0000031b  TIMG6_IRQHandler                     
-0000031b  TIMG7_IRQHandler                     
-0000031b  TIMG8_IRQHandler                     
-0000031b  UART0_IRQHandler                     
-0000031b  UART1_IRQHandler                     
-0000031b  UART2_IRQHandler                     
-0000031b  UART3_IRQHandler                     
-0000031d  __TI_decompress_lzss                 
-00000399  SYSCFG_DL_UART_3_init                
-000003fd  SYSCFG_DL_SYSCTL_init                
-00000455  DL_ADC12_setClockConfig              
-000004a1  DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK
-000004ed  DL_UART_init                         
-00000539  SYSCFG_DL_current_analog_init        
-00000585  SYSCFG_DL_GPIO_init                  
-000005c5  __TI_auto_init_nobinit_nopinit       
-00000601  SYSCFG_DL_initPower                  
-000006ad  _c_int00_noargs                      
-000006d5  DL_UART_setClockConfig               
-000006f9  SYSCFG_DL_init                       
-0000076b  __TI_zero_init_nomemset              
-00000781  DL_Common_delayCycles                
-000007a9  __TI_decompress_none                 
-000007d9  __aeabi_memcpy                       
-000007d9  __aeabi_memcpy4                      
-000007d9  __aeabi_memcpy8                      
-000007e1  Reset_Handler                        
-000007e5  _system_pre_init                     
-000007e8  C$$EXIT                              
-000007e9  abort                                
-00000830  __TI_Handler_Table_Base              
-0000083c  __TI_Handler_Table_Limit             
-00000850  __TI_CINIT_Base                      
-00000860  __TI_CINIT_Limit                     
-00000860  __TI_CINIT_Warm                      
+00000239  DL_SYSCTL_configSYSPLL               
+00000325  memcpy                               
+000003bf  ADC0_IRQHandler                      
+000003bf  ADC1_IRQHandler                      
+000003bf  AES_IRQHandler                       
+000003bf  CANFD0_IRQHandler                    
+000003bf  DAC0_IRQHandler                      
+000003bf  DMA_IRQHandler                       
+000003bf  Default_Handler                      
+000003bf  GROUP0_IRQHandler                    
+000003bf  GROUP1_IRQHandler                    
+000003bf  HardFault_Handler                    
+000003bf  I2C0_IRQHandler                      
+000003bf  I2C1_IRQHandler                      
+000003bf  NMI_Handler                          
+000003bf  PendSV_Handler                       
+000003bf  RTC_IRQHandler                       
+000003bf  SPI0_IRQHandler                      
+000003bf  SPI1_IRQHandler                      
+000003bf  SVC_Handler                          
+000003bf  SysTick_Handler                      
+000003bf  TIMA0_IRQHandler                     
+000003bf  TIMA1_IRQHandler                     
+000003bf  TIMG0_IRQHandler                     
+000003bf  TIMG12_IRQHandler                    
+000003bf  TIMG6_IRQHandler                     
+000003bf  TIMG7_IRQHandler                     
+000003bf  TIMG8_IRQHandler                     
+000003bf  UART0_IRQHandler                     
+000003bf  UART1_IRQHandler                     
+000003bf  UART2_IRQHandler                     
+000003bf  UART3_IRQHandler                     
+000003c1  __TI_decompress_lzss                 
+0000043d  SYSCFG_DL_current_analog_init        
+000004a5  SYSCFG_DL_UART_3_init                
+00000509  SYSCFG_DL_SYSCTL_init                
+00000561  DL_ADC12_setClockConfig              
+000005ad  DL_SYSCTL_switchMCLKfromSYSOSCtoHSCLK
+000005f9  DL_UART_init                         
+00000645  SYSCFG_DL_GPIO_init                  
+00000685  __TI_auto_init_nobinit_nopinit       
+000006c1  SYSCFG_DL_initPower                  
+0000076d  _c_int00_noargs                      
+00000795  DL_UART_setClockConfig               
+000007b9  SYSCFG_DL_init                       
+0000082b  __TI_zero_init_nomemset              
+00000841  DL_Common_delayCycles                
+00000869  __TI_decompress_none                 
+00000899  __aeabi_memcpy                       
+00000899  __aeabi_memcpy4                      
+00000899  __aeabi_memcpy8                      
+000008a1  Reset_Handler                        
+000008a5  _system_pre_init                     
+000008a8  C$$EXIT                              
+000008a9  abort                                
+00000920  __TI_Handler_Table_Base              
+0000092c  __TI_Handler_Table_Limit             
+00000934  __TI_CINIT_Base                      
+00000944  __TI_CINIT_Limit                     
+00000944  __TI_CINIT_Warm                      
+20200000  INACellNumeration                    
 20200000  __start___llvm_prf_bits              
 20200000  __start___llvm_prf_cnts              
 20200000  __stop___llvm_prf_bits               
 20200000  __stop___llvm_prf_cnts               
-20200000  gUART_3Backup                        
-20200030  UIMuxEnablePin                       
-20200034  HIGH                                 
-20200035  LOW                                  
+20200020  adc_value0                           
+20200040  adc_value1                           
+20200060  muxSetPins                           
+2020006c  UIMuxEnablePin                       
+20200070  i                                    
+20200074  HIGH                                 
+20200075  LOW                                  
+20200078  gUART_3Backup                        
 20207e00  __stack                              
 20208000  __STACK_END                          
 ffffffff  __TI_pprof_out_hndl                  
@@ -363,4 +379,4 @@ ffffffff  binit
 UNDEFED   __mpu_init                           
 UNDEFED   _system_post_cinit                   
 
-[90 symbols]
+[95 symbols]

BIN
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang.out


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 266 - 221
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang_linkInfo.xml


+ 4 - 1
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/ti_msp_dl_config.c

@@ -235,11 +235,14 @@ SYSCONFIG_WEAK void SYSCFG_DL_current_analog_init(void)
         DL_ADC12_SEQ_START_ADDR_00, DL_ADC12_SEQ_END_ADDR_01, DL_ADC12_SAMP_CONV_RES_12_BIT,
         DL_ADC12_SAMP_CONV_DATA_FORMAT_UNSIGNED);
     DL_ADC12_configConversionMem(current_analog_INST, current_analog_ADCMEM_0,
-        DL_ADC12_INPUT_CHAN_2, DL_ADC12_REFERENCE_VOLTAGE_VDDA, DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP0, DL_ADC12_AVERAGING_MODE_DISABLED,
+        DL_ADC12_INPUT_CHAN_2, DL_ADC12_REFERENCE_VOLTAGE_VDDA, DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP0, DL_ADC12_AVERAGING_MODE_ENABLED,
         DL_ADC12_BURN_OUT_SOURCE_DISABLED, DL_ADC12_TRIGGER_MODE_AUTO_NEXT, DL_ADC12_WINDOWS_COMP_MODE_DISABLED);
     DL_ADC12_configConversionMem(current_analog_INST, current_analog_ADCMEM_1,
         DL_ADC12_INPUT_CHAN_3, DL_ADC12_REFERENCE_VOLTAGE_VDDA, DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP0, DL_ADC12_AVERAGING_MODE_DISABLED,
         DL_ADC12_BURN_OUT_SOURCE_DISABLED, DL_ADC12_TRIGGER_MODE_AUTO_NEXT, DL_ADC12_WINDOWS_COMP_MODE_DISABLED);
+    DL_ADC12_configHwAverage(current_analog_INST,DL_ADC12_HW_AVG_NUM_ACC_16,DL_ADC12_HW_AVG_DEN_DIV_BY_16);
+    DL_ADC12_setSampleTime0(current_analog_INST,64000);
+    DL_ADC12_setSampleTime1(current_analog_INST,64000);
     DL_ADC12_enableConversions(current_analog_INST);
 }
 

BIN
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/Debug/ti_msp_dl_config.o


+ 22 - 6
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/gpio_toggle_output.c

@@ -104,6 +104,8 @@ void segmentBruecken(){
 
 }
 
+
+
 void set_mux_temperature(uint32_t cell_number){
     digitalWrite(TempMuxEnablePin[(cell_number >> 3)],LOW); //reset Multiplexer
     if(cell_number & 0b01){digitalWrite(muxSetPins[0],HIGH);} //choose Pin of Multiplexer
@@ -114,12 +116,18 @@ void set_mux_temperature(uint32_t cell_number){
 void set_mux_UI_meassurement(uint32_t cell_number){
     DL_GPIO_clearPins(GPIO_MUX_PORT, UIMuxEnablePin[(cell_number >> 3)]);
     if(cell_number & 0b001){DL_GPIO_setPins(GPIO_MUX_PORT, muxSetPins[0]);} //choose Pin of Multiplexer
+    else{DL_GPIO_clearPins(GPIO_MUX_PORT, muxSetPins[0]);} //choose Pin of Multiplexer
     if(cell_number & 0b010){DL_GPIO_setPins(GPIO_MUX_PORT, muxSetPins[1]);}
+    else{DL_GPIO_clearPins(GPIO_MUX_PORT, muxSetPins[1]);} //choose Pin of Multiplexer
     if(cell_number & 0b100){DL_GPIO_setPins(GPIO_MUX_PORT, muxSetPins[2]);}
+    else{DL_GPIO_clearPins(GPIO_MUX_PORT, muxSetPins[2]);} //choose Pin of Multiplexer
     DL_GPIO_setPins(GPIO_MUX_PORT, UIMuxEnablePin[(cell_number >> 3)]);
 }
 
 
+    int i = 0;
+    int adc_value0[] = {0,0,0,0,0,0,0,0};
+    int adc_value1[] = {0,0,0,0,0,0,0,0};
 
 int main(void)
 {
@@ -127,19 +135,27 @@ int main(void)
     SYSCFG_DL_init();
     setup();
 
-    setSR(0xFF,0xFF);
-    uint32_t i = 0;
+    setSR(0x00,0x00);
     while (1) {
-        delay_cycles(2*DELAY);
+        DL_ADC12_startConversion(current_analog_INST);
+        delay_cycles(0.1*DELAY);
         //setSR(0xFF,0xFF);
         //segmentBruecken();
         DL_GPIO_togglePins(GPIO_LED_PORT, GPIO_LED_LED1_PIN);
         DL_GPIO_togglePins(GPIO_LED_PORT, GPIO_LED_LED2_PIN);
-        delay_cycles(2*DELAY);
+        delay_cycles(0.1*DELAY);
         //setSR(0x00,0x00);
         DL_GPIO_togglePins(GPIO_LED_PORT, GPIO_LED_LED1_PIN);
         DL_GPIO_togglePins(GPIO_LED_PORT, GPIO_LED_LED2_PIN);   
-        set_mux_UI_meassurement(i);
-        if(i>=7){i=0;}
+        set_mux_UI_meassurement(INACellNumeration[i]);
+
+        //adc_value = current_analog_ADCMEM_0;
+        i++;
+        if(i >= 8){i=0;}
+        
+
+        adc_value0[INACellNumeration[i]] = DL_ADC12_getMemResult(current_analog_INST, current_analog_ADCMEM_0);
+        adc_value1[INACellNumeration[i]] = DL_ADC12_getMemResult(current_analog_INST, current_analog_ADCMEM_1);
+        DL_ADC12_enableConversions(current_analog_INST);
     }
 }

+ 5 - 0
gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang/gpio_toggle_output.syscfg

@@ -39,6 +39,11 @@ ADC121.samplingOperationMode      = "sequence";
 ADC121.adcMem3chansel             = "DL_ADC12_INPUT_CHAN_2";
 ADC121.endAdd                     = 1;
 ADC121.adcMem1chansel             = "DL_ADC12_INPUT_CHAN_3";
+ADC121.adcMem0avgen               = true;
+ADC121.sampleTime0                = "2 ms";
+ADC121.sampleTime1                = "2ms";
+ADC121.hwDenominator              = "DL_ADC12_HW_AVG_DEN_DIV_BY_16";
+ADC121.hwNumerator                = "DL_ADC12_HW_AVG_NUM_ACC_16";
 ADC121.peripheral.$assign         = "ADC0";
 ADC121.peripheral.adcPin2.$assign = "PA25";
 ADC121.peripheral.adcPin3.$assign = "PA24";

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác