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.

DSP 28335 Problem clearing PieCtrlRegs.PIEACK

Hello all,

I have seen an strange behavior in my DSP28335 debbuging procces.

I'm using DSP2833x_GlobalVariableDefs.c definitions.

When I clean the PieCtrlRegs.PIEACK.bit.ACK1 with the following sentence:

PieCtrlRegs.PIEACK.bit.ACK1=1;

The ACK2 become cleared too.I can' understand why this issue happens.

Do any have any idea or experience about that behavior?

Thanks in advance

  • Hi,

    Do any have any idea or experience about that behavior?

    There's no issue here! If you go through the document SPRUFB0D :

    In short, its not individual interrupts you can acknowledge but the whole group.

    Generally for eg. we use: PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;

    Regards,

    Gautam

  • I know I will clean all the group interrupts.

    My problem is that when I try to clean GROUP1, the GROUP2 is cleaned automatically.

    Thanks.

  • Hello all,

    any other feedback?

    I thinck it's not working properly and I don't know what I'm doing in a wrong way.

    Regards

  • Hi Josue,

    Can you just forward me the peripherals you're using in Group 1 and Group 2? I'll try to check the same at my end.

    Regards,

    Gautam

  • I'm using the Group1 for EOC of ADC purpose.

    Regarding Group 2, i'm using it for PWM TZ interruption.

    Thanks.

    // Set if used or clear if not

    #define AFE_SEQ1INT 0
    #define AFE_SEQ2INT 0
    #define AFE_XINT1      0
    #define AFE_XINT2      0
    #define AFE_ADCINT   1
    #define AFE_TINT0       0
    #define AFE_WAKEINT 0
    // Do not change manually this symbol_________________________________________________________________________________
    #define IER_INT1 (AFE_SEQ1INT|AFE_SEQ2INT|AFE_XINT1|AFE_XINT2|AFE_ADCINT|AFE_TINT0|AFE_WAKEINT)
    //____________________________________________________________________________________________________________________
    // Set if used or clear if not
    #define AFE_EPWM1_TZINT 1
    #define AFE_EPWM2_TZINT 1
    #define AFE_EPWM3_TZINT 1
    #define AFE_EPWM4_TZINT 0
    #define AFE_EPWM5_TZINT 0
    #define AFE_EPWM6_TZINT 0
    // Do not change manually this symbol_________________________________________________________________________________
    #define IER_INT2 (AFE_EPWM1_TZINT|AFE_EPWM2_TZINT|AFE_EPWM3_TZINT|AFE_EPWM4_TZINT|AFE_EPWM5_TZINT|AFE_EPWM6_TZINT)

  • I'm using the Group1 for EOC of ADC purpose.

    Regarding Group 2, i'm using it for PWM TZ interruption.

    Even I'd used ADC and TZ (F28335) interrupts; both the groups for one of my application and they performed really well. I would like you to follow the footsteps of the sample codes. They do work well without any issues.

    I've also tested 7 groups together, for my another application: all you've to do is follow the examples for all detailed configurations.

    Regards,

    Gautam

  • Hi Josue,

    If you read the description for this PIEACK register that Gautam posted, note that the register will read-back a '1' in a bit position if that interrupt group is pending.  When you use the .bit sub-field in your C code, the compiler can not generate an instruction to directly write to that bit/group of bits, so it instead generates a read-modify-write sequence of instructions on the whole PIEACK register.  

    Because of this, when you try to write '1' to .bit.ACK1 only, it reads the whole PIEACK register, modifies the read value to set the bit in the ACK1 field, but also finds 1 in the ACK2 field, and writes back the 1 that it found in an attempt to preserve the contents of the register (but really this clears that field). 

    I think you will want to use the 

    PieCtrlRegs.PIEACK.all = PIEACK_GROUP1;

    format when acknowledging the interrupts (it is fine to use the .bit fields to read the status).

     

     

  • That's the correct answer. Thanks a lot.

    Regards