This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am new to sysconfig and I now I likely need help getting the last pin connected on this Mikroe ProFET 15. I need an ADC pin on the booster header with the current configuration.
I have determined max output V as used at about 0.7VDC at 13.5VDC and 11A so less than 1.8VDC.
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --board "/ti/boards/CC3235SF_LAUNCHXL" --rtos "tirtos7" --product "simplelink_cc32xx_sdk@7.10.00.13" * @versions {"tool":"1.17.0+3128"} */ /** * Import the modules used in this configuration. */ const DriverLib = scripting.addModule("/ti/devices/DriverLib"); const Display = scripting.addModule("/ti/display/Display"); const Display1 = Display.addInstance(); const ADC = scripting.addModule("/ti/drivers/ADC", {}, false); const ADC1 = ADC.addInstance(); const Board = scripting.addModule("/ti/drivers/Board"); const Crypto = scripting.addModule("/ti/drivers/Crypto"); const Crypto1 = Crypto.addInstance(); const DMA = scripting.addModule("/ti/drivers/DMA"); const GPIO = scripting.addModule("/ti/drivers/GPIO"); const GPIO1 = GPIO.addInstance(); const GPIO2 = GPIO.addInstance(); const GPIO3 = GPIO.addInstance(); const GPIO4 = GPIO.addInstance(); const GPIO5 = GPIO.addInstance(); const I2C = scripting.addModule("/ti/drivers/I2C", {}, false); const I2C1 = I2C.addInstance(); const I2S = scripting.addModule("/ti/drivers/I2S", {}, false); const I2S1 = I2S.addInstance(); const Power = scripting.addModule("/ti/drivers/Power"); const SPI = scripting.addModule("/ti/drivers/SPI"); const SPI1 = SPI.addInstance(); const Timer = scripting.addModule("/ti/drivers/Timer"); const Timer1 = Timer.addInstance(); const Timer2 = Timer.addInstance(); const Timer3 = Timer.addInstance(); const Watchdog = scripting.addModule("/ti/drivers/Watchdog"); const Watchdog1 = Watchdog.addInstance(); const SimpleLinkWifi = scripting.addModule("/ti/drivers/net/wifi/SimpleLinkWifi"); const atcmd = scripting.addModule("/ti/drivers/net/wifi/atcmd", {}, false); const atcmd1 = atcmd.addInstance(); const net_utils = scripting.addModule("/ti/drivers/net/wifi/net_utils", {}, false); const net_utils1 = net_utils.addInstance(); const HTTPClient = scripting.addModule("/ti/net/HTTPClient", {}, false); const HTTPClient1 = HTTPClient.addInstance(); const MQTT = scripting.addModule("/ti/net/MQTT", {}, false); const MQTT1 = MQTT.addInstance(); const SNTP = scripting.addModule("/ti/net/SNTP"); const SlNet = scripting.addModule("/ti/net/SlNet"); const SlNet1 = SlNet.addInstance(); const Settings = scripting.addModule("/ti/posix/tirtos/Settings"); const BIOS = scripting.addModule("/ti/sysbios/BIOS"); const Event = scripting.addModule("/ti/sysbios/knl/Event"); const Idle = scripting.addModule("/ti/sysbios/knl/Idle", {}, false); const Idle2 = Idle.addInstance(); const Mailbox = scripting.addModule("/ti/sysbios/knl/Mailbox"); const Error = scripting.addModule("/ti/sysbios/runtime/Error"); const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback"); const Timestamp = scripting.addModule("/ti/sysbios/runtime/Timestamp"); const JSON = scripting.addModule("/ti/utils/JSON"); /** * Write custom configuration values to the imported modules. */ Display1.$name = "CONFIG_Display_0"; Display1.$hardware = system.deviceData.board.components.XDS110UART; Display1.uart.$name = "CONFIG_UART2_0"; Display1.uart.uart.$assign = "UART0"; Display1.uart.uart.txPin.$assign = "GP01"; Display1.uart.uart.txDmaChannel.$assign = "UDMA_CH9"; Display1.uart.uart.rxPin.$assign = "GP02"; Display1.uart.uart.rxDmaChannel.$assign = "UDMA_CH8"; ADC1.$name = "CONFIG_ADC_PFIS"; Crypto1.$name = "CONFIG_Crypto_0"; GPIO1.$hardware = system.deviceData.board.components.SW2; GPIO1.$name = "CONFIG_GPIO_BUTTON_0"; GPIO1.interruptTrigger = "Rising Edge"; GPIO1.gpioPin.$assign = "boosterpack.3"; GPIO2.$hardware = system.deviceData.board.components.SW3; GPIO2.$name = "CONFIG_GPIO_BUTTON_1"; GPIO2.interruptTrigger = "Rising Edge"; GPIO2.gpioPin.$assign = "boosterpack.11"; GPIO3.$hardware = system.deviceData.board.components.LED_BLUE; GPIO3.$name = "CONFIG_GPIO_LED_0"; GPIO4.$name = "CONFIG_GPIO_PF15IN"; GPIO4.mode = "Output"; GPIO4.gpioPin.$assign = "boosterpack.28"; GPIO5.$name = "CONFIG_GPIO_PFDEN"; GPIO5.gpioPin.$assign = "boosterpack.19"; I2C1.$hardware = system.deviceData.board.components.LP_I2C; I2C1.$name = "CONFIG_I2C_TMP"; I2S1.$name = "CONFIG_I2S_0"; Power.ioRetentionShutdown = ["GRP_1"]; Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0"; SPI1.$name = "CONFIG_SPI_0"; SPI1.mode = "Four Pin CS Active Low"; SPI1.defaultTxBufferValue = "0"; SPI1.spi.$assign = "SPI0"; SPI1.spi.sclkPin.$assign = "boosterpack.7"; SPI1.spi.pociPin.$assign = "boosterpack.14"; SPI1.spi.picoPin.$assign = "boosterpack.15"; SPI1.spi.dmaRxChannel.$assign = "UDMA_CH6"; SPI1.spi.dmaTxChannel.$assign = "UDMA_CH7"; SPI1.spi.csnPin.$assign = "boosterpack.18"; Timer1.$name = "CONFIG_TIMER_0"; Timer1.timerType = "32 Bits"; Timer1.timer.$assign = "Timer0"; Timer2.$name = "CONFIG_TIMER_1"; Timer2.timer.$assign = "Timer1"; Timer3.$name = "CONFIG_TIMER_2"; Timer3.timer.$assign = "Timer1"; Watchdog1.$name = "CONFIG_WATCHDOG_0"; Watchdog1.watchdog.$assign = "WATCHDOG0"; atcmd1.$name = "CONFIG_ATCMD_0"; net_utils1.$name = "CONFIG_NET_UTILS_0"; HTTPClient1.$name = "CONFIG_HTTPCLIENT_0"; MQTT1.$name = "CONFIG_MQTT_0"; SlNet1.$name = "CONFIG_SLNET"; SlNet1.ifName = "CC32xx"; BIOS.assertsEnabled = false; BIOS.heapBaseAddr = "__primary_heap_start__"; BIOS.heapEndAddr = "__primary_heap_end__"; const Hwi = scripting.addModule("/ti/sysbios/family/arm/m3/Hwi", {}, false); Hwi.enableException = false; Idle2.$name = "powerIdle"; Idle2.idleFxn = "Power_idleFunc"; const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false); Semaphore.supportsPriority = false; const Task = scripting.addModule("/ti/sysbios/knl/Task", {}, false); Task.checkStackFlag = false; Task.defaultStackSize = 512; Task.idleTaskStackSize = 512; Error.policy = "Error_SPIN"; Error.printDetails = false; const System = scripting.addModule("/ti/sysbios/runtime/System", {}, false); System.abortFxn = "System_abortSpin"; System.exitFxn = "System_exitSpin"; System.extendedFormats = "%f"; System.supportModule = "SysCallback"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to * re-solve from scratch. */ ADC1.adc.$suggestSolution = "ADC0"; ADC1.adc.adcPin.$suggestSolution = "<error>"; GPIO3.gpioPin.$suggestSolution = "boosterpack.29"; I2C1.i2c.$suggestSolution = "I2C0"; I2C1.i2c.sdaPin.$suggestSolution = "boosterpack.10"; I2C1.i2c.sclPin.$suggestSolution = "boosterpack.9"; I2S1.i2s.$suggestSolution = "McASP0"; I2S1.i2s.SD0Pin.$suggestSolution = "boosterpack.17"; I2S1.i2s.SD1Pin.$suggestSolution = "boosterpack.30"; I2S1.i2s.SCKPin.$suggestSolution = "boosterpack.4"; I2S1.i2s.WSPin.$suggestSolution = "boosterpack.27"; I2S1.i2s.dmaRxChannel.$suggestSolution = "UDMA_CH18"; I2S1.i2s.dmaTxChannel.$suggestSolution = "UDMA_CH19";
I must have mis thought nothing would work as the following seems to be OK? Is Analog Input 2 Pin 2 or 6 on boosterpack header?
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --board "/ti/boards/CC3235SF_LAUNCHXL" --rtos "tirtos7" --product "simplelink_cc32xx_sdk@7.10.00.13" * @versions {"tool":"1.17.0+3128"} */ /** * Import the modules used in this configuration. */ const DriverLib = scripting.addModule("/ti/devices/DriverLib"); const Display = scripting.addModule("/ti/display/Display"); const Display1 = Display.addInstance(); const ADC = scripting.addModule("/ti/drivers/ADC", {}, false); const ADC1 = ADC.addInstance(); const Board = scripting.addModule("/ti/drivers/Board"); const Crypto = scripting.addModule("/ti/drivers/Crypto"); const Crypto1 = Crypto.addInstance(); const DMA = scripting.addModule("/ti/drivers/DMA"); const GPIO = scripting.addModule("/ti/drivers/GPIO"); const GPIO2 = GPIO.addInstance(); const GPIO3 = GPIO.addInstance(); const GPIO4 = GPIO.addInstance(); const GPIO5 = GPIO.addInstance(); const GPIO6 = GPIO.addInstance(); const I2C = scripting.addModule("/ti/drivers/I2C", {}, false); const I2C1 = I2C.addInstance(); const I2S = scripting.addModule("/ti/drivers/I2S", {}, false); const I2S1 = I2S.addInstance(); const Power = scripting.addModule("/ti/drivers/Power"); const SPI = scripting.addModule("/ti/drivers/SPI"); const SPI1 = SPI.addInstance(); const Timer = scripting.addModule("/ti/drivers/Timer"); const Timer1 = Timer.addInstance(); const Timer2 = Timer.addInstance(); const Timer3 = Timer.addInstance(); const Watchdog = scripting.addModule("/ti/drivers/Watchdog"); const Watchdog1 = Watchdog.addInstance(); const SimpleLinkWifi = scripting.addModule("/ti/drivers/net/wifi/SimpleLinkWifi"); const atcmd = scripting.addModule("/ti/drivers/net/wifi/atcmd", {}, false); const atcmd1 = atcmd.addInstance(); const net_utils = scripting.addModule("/ti/drivers/net/wifi/net_utils", {}, false); const net_utils1 = net_utils.addInstance(); const HTTPClient = scripting.addModule("/ti/net/HTTPClient", {}, false); const HTTPClient1 = HTTPClient.addInstance(); const MQTT = scripting.addModule("/ti/net/MQTT", {}, false); const MQTT1 = MQTT.addInstance(); const SNTP = scripting.addModule("/ti/net/SNTP"); const SlNet = scripting.addModule("/ti/net/SlNet"); const SlNet1 = SlNet.addInstance(); const Settings = scripting.addModule("/ti/posix/tirtos/Settings"); const BIOS = scripting.addModule("/ti/sysbios/BIOS"); const Event = scripting.addModule("/ti/sysbios/knl/Event"); const Idle = scripting.addModule("/ti/sysbios/knl/Idle", {}, false); const Idle2 = Idle.addInstance(); const Mailbox = scripting.addModule("/ti/sysbios/knl/Mailbox"); const Error = scripting.addModule("/ti/sysbios/runtime/Error"); const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback"); const Timestamp = scripting.addModule("/ti/sysbios/runtime/Timestamp"); const JSON = scripting.addModule("/ti/utils/JSON"); /** * Write custom configuration values to the imported modules. */ Display1.$name = "CONFIG_Display_0"; Display1.$hardware = system.deviceData.board.components.XDS110UART; Display1.uart.$name = "CONFIG_UART2_0"; Display1.uart.uart.$assign = "UART0"; Display1.uart.uart.txPin.$assign = "GP01"; Display1.uart.uart.txDmaChannel.$assign = "UDMA_CH9"; Display1.uart.uart.rxPin.$assign = "GP02"; Display1.uart.uart.rxDmaChannel.$assign = "UDMA_CH8"; ADC1.$name = "CONFIG_ADC_PFIS"; ADC1.$hardware = system.deviceData.board.components.OPA4342.subComponents.AIN2; Crypto1.$name = "CONFIG_Crypto_0"; GPIO2.$hardware = system.deviceData.board.components.SW2; GPIO2.$name = "CONFIG_GPIO_BUTTON_0"; GPIO2.interruptTrigger = "Rising Edge"; GPIO2.gpioPin.$assign = "boosterpack.3"; GPIO3.$hardware = system.deviceData.board.components.SW3; GPIO3.$name = "CONFIG_GPIO_BUTTON_1"; GPIO3.interruptTrigger = "Rising Edge"; GPIO3.gpioPin.$assign = "boosterpack.11"; GPIO4.$hardware = system.deviceData.board.components.LED_BLUE; GPIO4.$name = "CONFIG_GPIO_LED_0"; GPIO5.$name = "CONFIG_GPIO_PF15IN"; GPIO5.mode = "Output"; GPIO5.gpioPin.$assign = "boosterpack.28"; GPIO6.$name = "CONFIG_GPIO_PFDEN"; GPIO6.gpioPin.$assign = "boosterpack.19"; I2C1.$hardware = system.deviceData.board.components.LP_I2C; I2C1.$name = "CONFIG_I2C_TMP"; I2S1.$name = "CONFIG_I2S_0"; Power.ioRetentionShutdown = ["GRP_1"]; Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0"; SPI1.$name = "CONFIG_SPI_0"; SPI1.mode = "Four Pin CS Active Low"; SPI1.defaultTxBufferValue = "0"; SPI1.spi.$assign = "SPI0"; SPI1.spi.sclkPin.$assign = "boosterpack.7"; SPI1.spi.pociPin.$assign = "boosterpack.14"; SPI1.spi.picoPin.$assign = "boosterpack.15"; SPI1.spi.dmaRxChannel.$assign = "UDMA_CH6"; SPI1.spi.dmaTxChannel.$assign = "UDMA_CH7"; SPI1.spi.csnPin.$assign = "boosterpack.18"; Timer1.$name = "CONFIG_TIMER_0"; Timer1.timerType = "32 Bits"; Timer1.timer.$assign = "Timer0"; Timer2.$name = "CONFIG_TIMER_1"; Timer2.timer.$assign = "Timer1"; Timer3.$name = "CONFIG_TIMER_2"; Timer3.timer.$assign = "Timer1"; Watchdog1.$name = "CONFIG_WATCHDOG_0"; Watchdog1.watchdog.$assign = "WATCHDOG0"; atcmd1.$name = "CONFIG_ATCMD_0"; net_utils1.$name = "CONFIG_NET_UTILS_0"; HTTPClient1.$name = "CONFIG_HTTPCLIENT_0"; MQTT1.$name = "CONFIG_MQTT_0"; SlNet1.$name = "CONFIG_SLNET"; SlNet1.ifName = "CC32xx"; BIOS.assertsEnabled = false; BIOS.heapBaseAddr = "__primary_heap_start__"; BIOS.heapEndAddr = "__primary_heap_end__"; const Hwi = scripting.addModule("/ti/sysbios/family/arm/m3/Hwi", {}, false); Hwi.enableException = false; Idle2.$name = "powerIdle"; Idle2.idleFxn = "Power_idleFunc"; const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false); Semaphore.supportsPriority = false; const Task = scripting.addModule("/ti/sysbios/knl/Task", {}, false); Task.checkStackFlag = false; Task.defaultStackSize = 512; Task.idleTaskStackSize = 512; Error.policy = "Error_SPIN"; Error.printDetails = false; const System = scripting.addModule("/ti/sysbios/runtime/System", {}, false); System.abortFxn = "System_abortSpin"; System.exitFxn = "System_exitSpin"; System.extendedFormats = "%f"; System.supportModule = "SysCallback"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to * re-solve from scratch. */ ADC1.adc.$suggestSolution = "ADC0"; ADC1.adc.adcPin.$suggestSolution = "boosterpack.2"; GPIO4.gpioPin.$suggestSolution = "boosterpack.29"; I2C1.i2c.$suggestSolution = "I2C0"; I2C1.i2c.sdaPin.$suggestSolution = "boosterpack.10"; I2C1.i2c.sclPin.$suggestSolution = "boosterpack.9"; I2S1.i2s.$suggestSolution = "McASP0"; I2S1.i2s.SD0Pin.$suggestSolution = "boosterpack.17"; I2S1.i2s.SD1Pin.$suggestSolution = "boosterpack.30"; I2S1.i2s.SCKPin.$suggestSolution = "boosterpack.4"; I2S1.i2s.WSPin.$suggestSolution = "boosterpack.27"; I2S1.i2s.dmaRxChannel.$suggestSolution = "UDMA_CH18"; I2S1.i2s.dmaTxChannel.$suggestSolution = "UDMA_CH19";
Always fails using BP 25 and sysconfig as listed. Do I need to only init once and not in loop? Is it the sysconfig?
// ADC_Handle adc; ADC_Params params; uint16_t adcValue0; uint32_t adcValue0MicroVolt; uint16_t adcValue1[ADC_SAMPLE_COUNT]; uint32_t adcValue1MicroVolt[ADC_SAMPLE_COUNT]; //.... while(1){ if (I2C_transfer(i2c, &i2cTransaction)){ //Extract degrees C from the received data; temperature = (rxBuffer[0] << 8) | (rxBuffer[1]); temperature = temperature * 0.0078125; ft=temperature; tt1=time(&tt1); Display_printf(display, 0, 0, "Sample %u: %dC\n", sample, temperature); if (temperature < g_td){ Display_printf(display, 0, 0, "Turn on the heat\n"); GPIO_write(CONFIG_GPIO_PF15IN,1);//CONFIG_GPIO_PF15IN // BTS7004 DEN and IS start GPIO_write(CONFIG_GPIO_PFDEN,1); usleep(1000); // //CONFIG_ADC_PFIS ADC_Params_init(¶ms); // ########### FAILS BELOW adc = ADC_open(CONFIG_ADC_PFIS, ¶ms); // ############ FAILS ABOVE if (adc == NULL){ Display_printf(display, 0, 0, "Error initializing CONFIG_ADC_PFIS\n"); while (1) {} } /* Blocking mode conversion */ res = ADC_convert(adc, &adcValue0); if (res == ADC_STATUS_SUCCESS){ adcValue0MicroVolt = (COMPENSATION_FACTOR * ADC_convertRawToMicroVolts(adc, adcValue0)) / 1000; Display_printf(display, 0, 0, "CONFIG_ADC_PFIS raw result: %d\n", adcValue0); Display_printf(display, 0, 0, "CONFIG_ADC_PFIS convert result: %d uV\n", adcValue0MicroVolt); } else{ Display_printf(display, 0, 0, "CONFIG_ADC_0 convert failed\n"); } ADC_close(adc); } else{ Display_printf(display, 0, 0, "Turn off the heat\n"); GPIO_write(CONFIG_GPIO_PF15IN,0); } // BTS7004 DEN and IS end //.... }
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --board "/ti/boards/CC3235SF_LAUNCHXL" --rtos "tirtos7" --product "simplelink_cc32xx_sdk@7.10.00.13" * @versions {"tool":"1.17.0+3128"} */ /** * Import the modules used in this configuration. */ const DriverLib = scripting.addModule("/ti/devices/DriverLib"); const Display = scripting.addModule("/ti/display/Display"); const Display1 = Display.addInstance(); const ADC = scripting.addModule("/ti/drivers/ADC", {}, false); const ADC1 = ADC.addInstance(); const Board = scripting.addModule("/ti/drivers/Board"); const Crypto = scripting.addModule("/ti/drivers/Crypto"); const Crypto1 = Crypto.addInstance(); const DMA = scripting.addModule("/ti/drivers/DMA"); const GPIO = scripting.addModule("/ti/drivers/GPIO"); const GPIO2 = GPIO.addInstance(); const GPIO3 = GPIO.addInstance(); const GPIO4 = GPIO.addInstance(); const GPIO5 = GPIO.addInstance(); const GPIO6 = GPIO.addInstance(); const I2C = scripting.addModule("/ti/drivers/I2C", {}, false); const I2C1 = I2C.addInstance(); const I2S = scripting.addModule("/ti/drivers/I2S", {}, false); const I2S1 = I2S.addInstance(); const Power = scripting.addModule("/ti/drivers/Power"); const SPI = scripting.addModule("/ti/drivers/SPI"); const SPI1 = SPI.addInstance(); const Timer = scripting.addModule("/ti/drivers/Timer"); const Timer1 = Timer.addInstance(); const Timer2 = Timer.addInstance(); const Timer3 = Timer.addInstance(); const Watchdog = scripting.addModule("/ti/drivers/Watchdog"); const Watchdog1 = Watchdog.addInstance(); const SimpleLinkWifi = scripting.addModule("/ti/drivers/net/wifi/SimpleLinkWifi"); const atcmd = scripting.addModule("/ti/drivers/net/wifi/atcmd", {}, false); const atcmd1 = atcmd.addInstance(); const net_utils = scripting.addModule("/ti/drivers/net/wifi/net_utils", {}, false); const net_utils1 = net_utils.addInstance(); const HTTPClient = scripting.addModule("/ti/net/HTTPClient", {}, false); const HTTPClient1 = HTTPClient.addInstance(); const MQTT = scripting.addModule("/ti/net/MQTT", {}, false); const MQTT1 = MQTT.addInstance(); const SNTP = scripting.addModule("/ti/net/SNTP"); const SlNet = scripting.addModule("/ti/net/SlNet"); const SlNet1 = SlNet.addInstance(); const Settings = scripting.addModule("/ti/posix/tirtos/Settings"); const BIOS = scripting.addModule("/ti/sysbios/BIOS"); const Event = scripting.addModule("/ti/sysbios/knl/Event"); const Idle = scripting.addModule("/ti/sysbios/knl/Idle", {}, false); const Idle2 = Idle.addInstance(); const Mailbox = scripting.addModule("/ti/sysbios/knl/Mailbox"); const Error = scripting.addModule("/ti/sysbios/runtime/Error"); const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback"); const Timestamp = scripting.addModule("/ti/sysbios/runtime/Timestamp"); const JSON = scripting.addModule("/ti/utils/JSON"); /** * Write custom configuration values to the imported modules. */ Display1.$name = "CONFIG_Display_0"; Display1.$hardware = system.deviceData.board.components.XDS110UART; Display1.uart.$name = "CONFIG_UART2_0"; Display1.uart.uart.$assign = "UART0"; Display1.uart.uart.txPin.$assign = "GP01"; Display1.uart.uart.txDmaChannel.$assign = "UDMA_CH9"; Display1.uart.uart.rxPin.$assign = "GP02"; Display1.uart.uart.rxDmaChannel.$assign = "UDMA_CH8"; ADC1.$hardware = system.deviceData.board.components.OPA4342.subComponents.AIN2; ADC1.$name = "CONFIG_ADC_PFIS"; ADC1.adc.$assign = "ADC0"; Crypto1.$name = "CONFIG_Crypto_0"; GPIO2.$hardware = system.deviceData.board.components.SW2; GPIO2.$name = "CONFIG_GPIO_BUTTON_0"; GPIO2.interruptTrigger = "Rising Edge"; GPIO2.gpioPin.$assign = "boosterpack.3"; GPIO3.$hardware = system.deviceData.board.components.SW3; GPIO3.$name = "CONFIG_GPIO_BUTTON_1"; GPIO3.interruptTrigger = "Rising Edge"; GPIO3.gpioPin.$assign = "boosterpack.11"; GPIO4.$hardware = system.deviceData.board.components.LED_BLUE; GPIO4.$name = "CONFIG_GPIO_LED_0"; GPIO5.$name = "CONFIG_GPIO_PF15IN"; GPIO5.mode = "Output"; GPIO5.gpioPin.$assign = "boosterpack.28"; GPIO6.$name = "CONFIG_GPIO_PFDEN"; GPIO6.gpioPin.$assign = "boosterpack.19"; I2C1.$hardware = system.deviceData.board.components.LP_I2C; I2C1.$name = "CONFIG_I2C_TMP"; I2S1.$name = "CONFIG_I2S_0"; Power.ioRetentionShutdown = ["GRP_1"]; Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0"; SPI1.$name = "CONFIG_SPI_0"; SPI1.mode = "Four Pin CS Active Low"; SPI1.defaultTxBufferValue = "0"; SPI1.spi.$assign = "SPI0"; SPI1.spi.sclkPin.$assign = "boosterpack.7"; SPI1.spi.pociPin.$assign = "boosterpack.14"; SPI1.spi.picoPin.$assign = "boosterpack.15"; SPI1.spi.dmaRxChannel.$assign = "UDMA_CH6"; SPI1.spi.dmaTxChannel.$assign = "UDMA_CH7"; SPI1.spi.csnPin.$assign = "boosterpack.18"; Timer1.$name = "CONFIG_TIMER_0"; Timer1.timerType = "32 Bits"; Timer1.timer.$assign = "Timer0"; Timer2.$name = "CONFIG_TIMER_1"; Timer2.timer.$assign = "Timer1"; Timer3.$name = "CONFIG_TIMER_2"; Timer3.timer.$assign = "Timer1"; Watchdog1.$name = "CONFIG_WATCHDOG_0"; Watchdog1.watchdog.$assign = "WATCHDOG0"; atcmd1.$name = "CONFIG_ATCMD_0"; net_utils1.$name = "CONFIG_NET_UTILS_0"; HTTPClient1.$name = "CONFIG_HTTPCLIENT_0"; MQTT1.$name = "CONFIG_MQTT_0"; SlNet1.$name = "CONFIG_SLNET"; SlNet1.ifName = "CC32xx"; BIOS.assertsEnabled = false; BIOS.heapBaseAddr = "__primary_heap_start__"; BIOS.heapEndAddr = "__primary_heap_end__"; const Hwi = scripting.addModule("/ti/sysbios/family/arm/m3/Hwi", {}, false); Hwi.enableException = false; Idle2.$name = "powerIdle"; Idle2.idleFxn = "Power_idleFunc"; const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false); Semaphore.supportsPriority = false; const Task = scripting.addModule("/ti/sysbios/knl/Task", {}, false); Task.checkStackFlag = false; Task.defaultStackSize = 512; Task.idleTaskStackSize = 512; Error.policy = "Error_SPIN"; Error.printDetails = false; const System = scripting.addModule("/ti/sysbios/runtime/System", {}, false); System.abortFxn = "System_abortSpin"; System.exitFxn = "System_exitSpin"; System.extendedFormats = "%f"; System.supportModule = "SysCallback"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to * re-solve from scratch. */ ADC1.adc.adcPin.$suggestSolution = "boosterpack.2"; GPIO4.gpioPin.$suggestSolution = "boosterpack.29"; I2C1.i2c.$suggestSolution = "I2C0"; I2C1.i2c.sdaPin.$suggestSolution = "boosterpack.10"; I2C1.i2c.sclPin.$suggestSolution = "boosterpack.9"; I2S1.i2s.$suggestSolution = "McASP0"; I2S1.i2s.SD0Pin.$suggestSolution = "boosterpack.17"; I2S1.i2s.SD1Pin.$suggestSolution = "boosterpack.30"; I2S1.i2s.SCKPin.$suggestSolution = "boosterpack.4"; I2S1.i2s.WSPin.$suggestSolution = "boosterpack.27"; I2S1.i2s.dmaRxChannel.$suggestSolution = "UDMA_CH18"; I2S1.i2s.dmaTxChannel.$suggestSolution = "UDMA_CH19";
Hi Malcolm,
You didnt specify what error you are receiving so it is difficult to pinpoint what could be going wrong. Definitely only initialize the ADC once, and try using another analog input for Example 3. There is also a handy launchpad view in syssconfgi which explains what pins are being used.
Kind Regards,
Rogelio
After going through many troubles, I ending up adding some adc only lines from adcsinglechannel to my primary i2c+tcpecho sysconfig, renaming the adc to match code, and forgetting the ADC_init() until identified as the null problem. Now to get check adc to look like the 0.7V I measured otherwise, add to reporting,....Not that hard if one makes no mistakes.
/** * These arguments were used when this file was generated. They will be automatically applied on subsequent loads * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments. * @cliArgs --board "/ti/boards/CC3235SF_LAUNCHXL" --rtos "tirtos7" --product "simplelink_cc32xx_sdk@7.10.00.13" * @versions {"tool":"1.17.0+3128"} */ /** * Import the modules used in this configuration. */ const DriverLib = scripting.addModule("/ti/devices/DriverLib"); const Display = scripting.addModule("/ti/display/Display"); const Display1 = Display.addInstance(); const ADC = scripting.addModule("/ti/drivers/ADC"); const ADC1 = ADC.addInstance(); const Board = scripting.addModule("/ti/drivers/Board"); const Crypto = scripting.addModule("/ti/drivers/Crypto"); const Crypto1 = Crypto.addInstance(); const DMA = scripting.addModule("/ti/drivers/DMA"); const GPIO = scripting.addModule("/ti/drivers/GPIO"); const GPIO1 = GPIO.addInstance(); const GPIO2 = GPIO.addInstance(); const GPIO3 = GPIO.addInstance(); const GPIO4 = GPIO.addInstance(); const GPIO5 = GPIO.addInstance(); const I2C = scripting.addModule("/ti/drivers/I2C", {}, false); const I2C1 = I2C.addInstance(); const I2S = scripting.addModule("/ti/drivers/I2S", {}, false); const I2S1 = I2S.addInstance(); const Power = scripting.addModule("/ti/drivers/Power"); const SPI = scripting.addModule("/ti/drivers/SPI"); const SPI1 = SPI.addInstance(); const Timer = scripting.addModule("/ti/drivers/Timer"); const Timer1 = Timer.addInstance(); const Timer2 = Timer.addInstance(); const Timer3 = Timer.addInstance(); const Watchdog = scripting.addModule("/ti/drivers/Watchdog"); const Watchdog1 = Watchdog.addInstance(); const SimpleLinkWifi = scripting.addModule("/ti/drivers/net/wifi/SimpleLinkWifi"); const atcmd = scripting.addModule("/ti/drivers/net/wifi/atcmd", {}, false); const atcmd1 = atcmd.addInstance(); const net_utils = scripting.addModule("/ti/drivers/net/wifi/net_utils", {}, false); const net_utils1 = net_utils.addInstance(); const HTTPClient = scripting.addModule("/ti/net/HTTPClient", {}, false); const HTTPClient1 = HTTPClient.addInstance(); const MQTT = scripting.addModule("/ti/net/MQTT", {}, false); const MQTT1 = MQTT.addInstance(); const SNTP = scripting.addModule("/ti/net/SNTP"); const SlNet = scripting.addModule("/ti/net/SlNet"); const SlNet1 = SlNet.addInstance(); const Settings = scripting.addModule("/ti/posix/tirtos/Settings"); const BIOS = scripting.addModule("/ti/sysbios/BIOS"); const Event = scripting.addModule("/ti/sysbios/knl/Event"); const Idle = scripting.addModule("/ti/sysbios/knl/Idle", {}, false); const Idle2 = Idle.addInstance(); const Mailbox = scripting.addModule("/ti/sysbios/knl/Mailbox"); const Error = scripting.addModule("/ti/sysbios/runtime/Error"); const SysCallback = scripting.addModule("/ti/sysbios/runtime/SysCallback"); const Timestamp = scripting.addModule("/ti/sysbios/runtime/Timestamp"); const JSON = scripting.addModule("/ti/utils/JSON"); /** * Write custom configuration values to the imported modules. */ Display1.$name = "CONFIG_Display_0"; Display1.$hardware = system.deviceData.board.components.XDS110UART; Display1.uart.$name = "CONFIG_UART2_0"; Display1.uart.uart.$assign = "UART0"; Display1.uart.uart.txPin.$assign = "GP01"; Display1.uart.uart.txDmaChannel.$assign = "UDMA_CH9"; Display1.uart.uart.rxPin.$assign = "GP02"; Display1.uart.uart.rxDmaChannel.$assign = "UDMA_CH8"; ADC1.$hardware = system.deviceData.board.components.OPA4342.subComponents.AIN3; ADC1.$name = "CONFIG_ADC_PFIS"; Crypto1.$name = "CONFIG_Crypto_0"; GPIO1.$hardware = system.deviceData.board.components.SW2; GPIO1.$name = "CONFIG_GPIO_BUTTON_0"; GPIO1.interruptTrigger = "Rising Edge"; GPIO1.gpioPin.$assign = "boosterpack.3"; GPIO2.$hardware = system.deviceData.board.components.SW3; GPIO2.$name = "CONFIG_GPIO_BUTTON_1"; GPIO2.interruptTrigger = "Rising Edge"; GPIO2.gpioPin.$assign = "boosterpack.11"; GPIO3.$hardware = system.deviceData.board.components.LED_BLUE; GPIO3.$name = "CONFIG_GPIO_LED_0"; GPIO4.$name = "CONFIG_GPIO_PF15IN"; GPIO4.mode = "Output"; GPIO4.gpioPin.$assign = "boosterpack.28"; GPIO5.mode = "Output"; GPIO5.$name = "CONFIG_GPIO_PFDEN"; GPIO5.gpioPin.$assign = "boosterpack.19"; I2C1.$hardware = system.deviceData.board.components.LP_I2C; I2C1.$name = "CONFIG_I2C_TMP"; I2S1.$name = "CONFIG_I2S_0"; Power.ioRetentionShutdown = ["GRP_1"]; Power.parkPins.$name = "ti_drivers_power_PowerCC32XXPins0"; SPI1.$name = "CONFIG_SPI_0"; SPI1.mode = "Four Pin CS Active Low"; SPI1.defaultTxBufferValue = "0"; SPI1.spi.$assign = "SPI0"; SPI1.spi.sclkPin.$assign = "boosterpack.7"; SPI1.spi.pociPin.$assign = "boosterpack.14"; SPI1.spi.picoPin.$assign = "boosterpack.15"; SPI1.spi.dmaRxChannel.$assign = "UDMA_CH6"; SPI1.spi.dmaTxChannel.$assign = "UDMA_CH7"; SPI1.spi.csnPin.$assign = "boosterpack.18"; Timer1.$name = "CONFIG_TIMER_0"; Timer1.timerType = "32 Bits"; Timer1.timer.$assign = "Timer0"; Timer2.$name = "CONFIG_TIMER_1"; Timer2.timer.$assign = "Timer1"; Timer3.$name = "CONFIG_TIMER_2"; Timer3.timer.$assign = "Timer1"; Watchdog1.$name = "CONFIG_WATCHDOG_0"; Watchdog1.watchdog.$assign = "WATCHDOG0"; atcmd1.$name = "CONFIG_ATCMD_0"; net_utils1.$name = "CONFIG_NET_UTILS_0"; HTTPClient1.$name = "CONFIG_HTTPCLIENT_0"; MQTT1.$name = "CONFIG_MQTT_0"; SlNet1.$name = "CONFIG_SLNET"; SlNet1.ifName = "CC32xx"; BIOS.assertsEnabled = false; BIOS.heapBaseAddr = "__primary_heap_start__"; BIOS.heapEndAddr = "__primary_heap_end__"; const Hwi = scripting.addModule("/ti/sysbios/family/arm/m3/Hwi", {}, false); Hwi.enableException = false; Idle2.$name = "powerIdle"; Idle2.idleFxn = "Power_idleFunc"; const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false); Semaphore.supportsPriority = false; const Task = scripting.addModule("/ti/sysbios/knl/Task", {}, false); Task.checkStackFlag = false; Task.defaultStackSize = 512; Task.idleTaskStackSize = 512; Error.policy = "Error_SPIN"; Error.printDetails = false; const System = scripting.addModule("/ti/sysbios/runtime/System", {}, false); System.abortFxn = "System_abortSpin"; System.exitFxn = "System_exitSpin"; System.extendedFormats = "%f"; System.supportModule = "SysCallback"; /** * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to * re-solve from scratch. */ ADC1.adc.$suggestSolution = "ADC0"; ADC1.adc.adcPin.$suggestSolution = "boosterpack.26"; GPIO3.gpioPin.$suggestSolution = "boosterpack.29"; I2C1.i2c.$suggestSolution = "I2C0"; I2C1.i2c.sdaPin.$suggestSolution = "boosterpack.10"; I2C1.i2c.sclPin.$suggestSolution = "boosterpack.9"; I2S1.i2s.$suggestSolution = "McASP0"; I2S1.i2s.SD0Pin.$suggestSolution = "boosterpack.17"; I2S1.i2s.SD1Pin.$suggestSolution = "boosterpack.30"; I2S1.i2s.SCKPin.$suggestSolution = "boosterpack.4"; I2S1.i2s.WSPin.$suggestSolution = "boosterpack.27"; I2S1.i2s.dmaRxChannel.$suggestSolution = "UDMA_CH18"; I2S1.i2s.dmaTxChannel.$suggestSolution = "UDMA_CH19";