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.

CC1310: The external interrupt does not work after a reboot.

Part Number: CC1310

Tool/software:

Hello everyone.

I am working against time to solve a problem with my CC1310 device and hope to have your help.

My CC1310 custom board includes a MPU6050 accelerometer which is connected to the DIO6 pin and its configuration is as follows.

PIN_Config pinTable[]={
/*Accelerometer interrupt*/
CC1310_LAUNCHXL_ACEL_INT | PIN_INPUT_EN | PIN_PULLUP | PIN_IRQ_NEGEDGE | PIN_HYSTERESIS,
PIN_TERMINATE
};

In first instance my CC1310 device detects movement by means of the interrupt on the DIO6 pin and sends data by UART (here everything is fine).
After getting a response from the UART receiving device, my CC1310 device (transmitter) must read data from a sensor via SPI, this data is loaded into the payload TX packet and sent to a CC1310 receiving device, the latter must respond to the transmitter with an acknowledgement (from this point onwards the problem occurs sometimes) I have observed that if the transmission and reception of RF message mentioned above is not completed correctly the system in the transmitter crashes. (to solve this I thought that with a push of the reset button on my cc1310 device (transmitter) everything would work fine and my life would be happier) but the problem is that after the reset the CC1310 does not detect the motion interruption coming from the MPU6050 and it can only operate correctly again if I disconnect and connect the power (battery) completely.

What can cause this behavior and how can I fix it?
Does the pin reset turn the CC1310 completely off and on all DIOs including the RF core?

Is it just a problem with the MPU6050?

I have done a second code omitting the RF message transmission section and when reset by the pin it works as I expect, so my intuition tells me that the problem could be caused by that section.

This is my RF section, is there anything wrong or that I am not taking into account?

txPacket.payload[0] = 0xAE;
txPacket.payload[1] = 0x00;
txPacket.payload[2] = 0xB1;
txPacket.payload[3] = 0xDD;

uint8_t j,i;
for(j = 4, i = 0;j!=sizeof(ID_Main)+5;j++,++i){ 
txPacket.payload[j] = ID_Main[i];
}

uint8_t k,l;
for(k = 12, l = 0;k!=sizeof(TID)+13;k++,++l){
txPacket.payload[k] = TID[l];
}//*/

txPacket.len = 24;
memcpy(&txPacket.dstAddr,&dir_broadcast, sizeof(dir_broadcast));
EasyLink_transmitAsync(&txPacket, TxDoneCb);

Semaphore_pend(RXSem, BIOS_WAIT_FOREVER);
EasyLink_receiveAsync(rxDoneCb, 0);

if(Semaphore_pend(RXSem, (3000000 / Clock_tickPeriod)) == FALSE){
if(EasyLink_abort() == EasyLink_Status_Success){
Semaphore_pend(RXSem, BIOS_WAIT_FOREVER);
}
}

Thanks in advance!

  • Hi J,

    One good thing do to would be to reset the MPU6050 when rebooting the CC1310:

    It is very possible that it is left hanging after the CC1310 crashed.

    Do you have more data on the CC1310 crash by the way? Do you observe any exception through ROV, or do you have any PC or exception register value occuring?

    Regards,

    Arthur

  • Hi Arthur.

    Thanks for your suggestion, I am starting work activities, so I will try to do the MPU6050 reset by restarting CC1310. I will also be checking the ROV. I will send my results a couple of hours later.

    Thanks!

  • Hi Arthur. 

    static void Task_ONE(UArg arg0, UArg arg1){
    
        static PIN_Handle  accelPinHandle;
        static PIN_State   accelPinState;
    
        /*Semaforo*/
         Semaphore_Params params;
         Semaphore_Params_init(&params);
         RXSem = Semaphore_create(0, &params, NULL);
    
    
         reset_MPU6050();
         usleep(100000);
    
         accelPinHandle = PIN_open(&acelerometroPinState, pinTable);
         PIN_registerIntCb(accelPinHandle, &accelInt);
    
         ACCEL_Init_MPU6050();
         Init_MPU6050_GYRO();
         
         
         while(1){
             
             // My code
         }
         
    }

    I have solved it.
    I implemented a function that writes the reset bit to the MPU6050, and in the highest priority task that runs first add the pin and interrupt configuration as follows.
    I have tested it and it works successfully.

    Thanks for support. Slight smile