Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS
Tool/software:
Hi,
We are currently starting a new development using the CC1314R10 and are currently in the process of setting up the project using SysConfig and TI-RTOS7.
However using the ADCBuf driver results in an invalid configuration being generated. The macro CONFIG_TI_DRIVERS_ADCBUF_COUNT
is generated for the ADCBuf section as well as the ADCBuf channels in the ti_drivers_config.h file.
We are using the current SDK simplelink_cc13xx_cc26xx_sdk_7_41_00_17.
The issue can be reproduced by using the adcbufcontinuous example and increasing the ADCBuf channels.
Excerpt from ti_drivers_config.h
/*
* ======== ADCBuf ========
*/
extern const uint_least8_t CONFIG_ADCBUF_0_CONST;
#define CONFIG_ADCBUF_0 0
#define CONFIG_TI_DRIVERS_ADCBUF_COUNT 1
/*
* ======== ADCBuf Channels ========
*/
/* DIO24 */
extern const uint_least8_t CONFIG_ADCBUF_0_CHANNEL_0_CONST;
#define CONFIG_ADCBUF_0_CHANNEL_0 0
/* DIO23 */
extern const uint_least8_t ADCBUF_CHANNEL_0_CONST;
#define ADCBUF_CHANNEL_0 1
#define CONFIG_TI_DRIVERS_ADCBUF_COUNT 2
The modified sysconfig file:
/**
* 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/LP_EM_CC1314R10" --rtos "tirtos7" --product "simplelink_cc13xx_cc26xx_sdk@7.41.00.17"
* @versions {"tool":"1.18.1+3343"}
*/
/**
* Import the modules used in this configuration.
*/
const Display = scripting.addModule("/ti/display/Display");
const Display1 = Display.addInstance();
const ADCBuf = scripting.addModule("/ti/drivers/ADCBuf");
const ADCBuf1 = ADCBuf.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");
/**
* 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";
ADCBuf1.$name = "CONFIG_ADCBUF_0";
ADCBuf1.channels = 2;
ADCBuf1.timerInstance.$name = "CONFIG_GPTIMER_0";
ADCBuf1.adcBufChannel0.$name = "CONFIG_ADCBUF_0_CHANNEL_0";
ADCBuf1.adcBufChannel1.$name = "ADCBUF_CHANNEL_0";
const CCFG = scripting.addModule("/ti/devices/CCFG", {}, false);
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";
BIOS.assertsEnabled = false;
BIOS.heapBaseAddr = "__primary_heap_start__";
BIOS.heapEndAddr = "__primary_heap_end__";
const Clock = scripting.addModule("/ti/sysbios/knl/Clock", {}, false);
Clock.tickPeriod = 10;
const Timer = scripting.addModule("/ti/sysbios/family/arm/v8m/cc26x4/Timer", {}, false);
Idle2.$name = "powerIdle";
Idle2.idleFxn = "Power_idleFunc";
const Semaphore = scripting.addModule("/ti/sysbios/knl/Semaphore", {}, false);
Semaphore.supportsPriority = false;
const Swi = scripting.addModule("/ti/sysbios/knl/Swi", {}, false);
Swi.numPriorities = 6;
const Task = scripting.addModule("/ti/sysbios/knl/Task", {}, false);
Task.checkStackFlag = false;
Task.defaultStackSize = 512;
Task.idleTaskStackSize = 512;
Task.numPriorities = 6;
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.
*/
Display1.uart.uart.$suggestSolution = "UART0";
Display1.uart.uart.txPin.$suggestSolution = "boosterpack.4";
Display1.uart.uart.rxPin.$suggestSolution = "boosterpack.3";
ADCBuf1.adc.$suggestSolution = "ADC0";
ADCBuf1.adc.dmaADCChannel.$suggestSolution = "DMA_CH7";
ADCBuf1.timerInstance.timer.$suggestSolution = "GPTM0";
ADCBuf1.adcBufChannel0.adc.$suggestSolution = "ADC0";
ADCBuf1.adcBufChannel0.adc.adcPin.$suggestSolution = "boosterpack.6";
ADCBuf1.adcBufChannel1.adc.$suggestSolution = "ADC0";
ADCBuf1.adcBufChannel1.adc.adcPin.$suggestSolution = "boosterpack.2";
Timer.rtc.$suggestSolution = "RTC0";