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.

Controlling "exit-active from interrupts" in SYSBIOS

Other Parts Discussed in Thread: SYSBIOS, MSP430F5528

Dear SYSBIOS team

I am using SYSBIOS on an MSP430F5528 design. I am in a situation where a very large number of very short interrupts occur and I am running into the UCS7 erratum (FLL drifts because it is not enabled for a sufficient length of time). The interrupts need to exit active to allow other short tasks to run. Forcing the FLL to be active for the required 150us at every interrupt is not an option because the wasted time would become enormous (close to 100% of the time). I am in a situation where I could use the DCO in open loop (without the FLL) because the MCLK does not need to be very precise. However I cannot find a way to direct SYSBIOS to avoid enabling the FLL when exiting-active from the interrupts. Is there a way to force SYSBIOS to not activate the FLL when the "exit-active from interrupts" option is used? I can see where the FLL is activated within the interrupt stubs, but I cannot change that code because it is automatically generated by SYSBIOS...

Thank you for your help

Bruno

  • Bruno,

    I think I see what you are asking.  Might this be reworded as: you’d like to keep the CPU awake following the RETI instruction, but don’t want to enable SCG0 when the SYS/BIOS interrupt stub is modifying the SR that was pushed onto the stack?

    If this is what you are asking…

    Today, there isn’t a way to specify this in the SYS/BIOS configuration.  The assumption has been that returning to active mode means returning to full CPU active mode where the FLL is enabled.
     
    I can file a feature request to be looked at for a future release (if this is what you want).

    A couple of ways I think you can workaround this:

    1) Copy the normally generated SYS/BIOS interrupt stub, modify it as needed, and include this source in your project build.  And then remove the configuration of the interrupt from SYS/BIOS (making this a user-managed interrupt).  This might be best for controlling the behavior for a subset of interrupts only.

    Or 2) Modify the template file that SYS/BIOS configuration scripting uses to generate the interrupt stubs.  The file is Hwi.xdt, in the packages/ti/sysbios/family/msp430 subdirectory of the SYS/BIOS install.  Make a backup copy of this file, and then modify these statements:

        __bic_SR_register_on_exit(0xF0);

    to:

        __bic_SR_register_on_exit(0x80);

    Will this work for what you want to do?

    Scott

  • Hi Scott

    1) Yes, that is exactly what I am asking

    2) Yes, if you could file this as a new feature request that would be great!

    3) In the mean time I will try the two workarounds that you propose. If either works that should get me out of this bind!

    Many thanks!

    Bruno

  • Hi Scott

     

    I tried modifying the HWI.xdt file and it does work.

     

    Thank you for your help

     

    Regards

     

    Bruno

  • Hi Bruno,

    OK, great!  Thanks for reporting back.

    I filed the feature request, the ID is: SDOCM00097196

    Regards,
    Scott