Hi Team,
A customer uses SCS to do some test about DAC output from analog pin, please check his problem below:
CCS 930
SDK simplelink-cc13x2-26x2sdk-3-40-00-02
SCS setup_sensor_controller_studio_2_6_0_132
1. The output level could change with input.DACLEVELSET while similating with SCS, but it was a square wave of 330HZ,90% duty cycle.
Here is some snippet of his code:
#include "mySCIFapp.h" //
//#include <unistd.h>
//#include <stddef.h>
// SCIF driver callback: Task control interface ready (non-blocking task control operation completed)
void scCtrlReadyCallback(void)
{
}
// SCIF driver callback: Sensor Controller task code has generated an alert interrupt
void scTaskAlertCallback(void)
{
}
void MySCInit()
{
// Initialize the SCIF operating system abstraction layer
scifOsalInit();
scifOsalRegisterCtrlReadyCallback(scCtrlReadyCallback);
scifOsalRegisterTaskAlertCallback(scTaskAlertCallback);
// Initialize the SCIF driver
scifInit(&scifMyDriverSetup);
// scifMyTaskData.dactast.input.DACLEVELSET =200;
scifStartTasksNbl(1 << SCIF_MY_DACTAST_TASK_ID);
}
void MyDACValueSet(uint16_t value)
{
//uint16_t temp=0;
// Stop the "DACTAST" Sensor Controller task
if (scifWaitOnNbl(20000) != SCIF_SUCCESS) {
}
else if (scifStopTasksNbl(1 << SCIF_MY_DACTAST_TASK_ID) != SCIF_SUCCESS) {
}
scifMyTaskData.dactast.cfg.DACLEVELINITVALUE = value;
scifMyTaskData.dactast.input.DACLEVELSET =value;
// (Re)start the "DACTAST" Sensor Controller task
if (scifWaitOnNbl(200000) != SCIF_SUCCESS) {
}
else if (scifStartTasksNbl(1 << SCIF_MY_DACTAST_TASK_ID) != SCIF_SUCCESS) {
}
//temp=scifMyTaskData.dactast.input.DACLEVELSET;
}
BR,
Viki Shi