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.

CCS/LAUNCHXL-CC1310: About Interrupt response time

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Tool/software: Code Composer Studio

Hi Team,

SDK:simplelink_cc13x0_sdk_4_10_01_01

Example:gpiointerrupt


My customer now needs to configure GPIOCC26XX_DIO_21 as an interrupt triggered by a rising edge to connect to an external sensor.

The sensor pin is output with a square wave signal cycle of 8us. The interrupt configuration is OK, and debugging can be interrupted.

Since the sensor has a conversion time of 20ms, that imeans every 20ms the sensor will output pulses with an 8us square wave signal.

The normal output should be about 1200. It is 1200 in stm32. But the number of pulses is only about 290 in CC1310 throgh DIO21.

Is it related to IO input rate?Could you help to check it?

 

int main(void)
{
/* Call driver init functions */
Board_init();

/* Start NoRTOS */
NoRTOS_start();

/* Call mainThread function */
mainThread(NULL);

while (1) {}
}

GPIO_setConfig(Board_GPIO_NST1001_P, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_HIGH);
GPIO_setConfig(Board_GPIO_NST1001_DQ, GPIO_CFG_IN_NOPULL | GPIO_CFG_IN_INT_RISING);//DQ rising interrupt
GPIO_write(Board_GPIO_NST1001_P, 1);
/* install Button callback */
GPIO_setCallback(Board_GPIO_NST1001_DQ, NST1001_Int);

C_FLAG = 0; //
CPUdelay(1000); //
//usleep(1000);
/* Enable interrupts */
GPIO_enableInt(Board_GPIO_NST1001_DQ);

if(C_FLAG==1)
{
C_FLAG = 0;
//usleep(10000); //
CPUdelay(10000*48/4);// about 10000us
//Task_sleep(1000);

if(C_FLAG==0) //
{
GPIO_disableInt(Board_GPIO_NST1001_DQ); //

data_wendu[i] = (COUNT*0.0625f - 50.0625f); //
//printf("short = %2.1f---%d\n",data_wendu[i],COUNT);
data_wendu[i] = compensate_temp(data_wendu[i]);
sum_wd += data_wendu[i];
i++;

if(i>=10)
{
for(i=1,min=max=data_wendu[0];i<10;i++)
{
if(data_wendu[i]<min) min = data_wendu[i]; //
if(data_wendu[i]>max) max = data_wendu[i]; //
}
data_wendu_rul = (sum_wd-min-max)/(10-2); //
// printf("short = %2.1f---%d\n",data_wendu_rul,COUNT);
i = 0;
sum_wd = 0;
}

COUNT=0;
GPIO_enableInt(Board_GPIO_NST1001_DQ); //enable interrupt

GPIO_toggle(Board_GPIO_LED0);
}
}

The following is an 8us pulse signal output at a sensing interval of about 40ms:

Put the LED flip indicator in the interrupt callback of IO21:

Regards,

Kevin

 

 

 

 

  • Hi Kevin,

    It is not super clear to me what I'm looking at in the pictures, it seems to be two signals in the first?

    Would it be possible for you to share the full code used to test this? There is a few things that need to be considered in this case, the first is that the device need to be forced to stay in full active mode in order for this to work as the Idle -> Active responds is typically 14 us (standby -> active is even longer).

    I would think that the GPTimer is a better module for this, using it in input edge count mode. If you could elaborate a bit more on the exact nature of the sensor then I could give you more specific recommendations.