MSP430FR5969: Problems enabling MPU interrupts through code composer studio

Part Number: MSP430FR5969
Other Parts Discussed in Thread: MSP430WARE

I have CCS version 12.7.0.00007 and I'm having difficulty configuring the MPU using the GUI project settings. My target platform is the MSP430FR5969 and I would like to configure the MPU as follows:

  • Enable the MPU
  • Let the compiler handle memory partitioning, access rights...etc
  • Enable MPU interrupts (NMI)

The problem is that the "enable NMI" option is greyed out in that GUI as you can see here:

Since I was not able to enable NMI using the above GUI, I tried to enable NMI by adding "_MPU_ENABLE_NMI" to the compiler predefined symbols as shown here:

The problem is that when I click "apply and close", that compiler flag gets deleted/lost (I think the GUI setting overrides it). I also tried adding "_MPU_ENABLE_NMI" to the linker command file preprocessing but that setting gets lost when I "apply and close" as well.

So the long story short, how can I configure the MPU as follows using CCS studio?

  • Enable MPU
  • Enable MPU interrupts (NMI)
  • Let the compiler handle memory partitioning and access rights.

I would greatly appreciate if someone can try to replicate this issue on their end and confirm that they are seeing the same issue. If you are able to configure the MPU as described above, please share the exact steps/order of settings so that I can try it on my end. I've tried several different iterations and permutations of these settings but unfortunately, it doesn't seem to work.

Thank you very much for your help,

Aamer

  • Hello Aamer,

    I have CCS 12.4 currently installed, and I'm able to add the _MPU_ENABLE_NMI symbol no problem in a few of the FR5969 example projects I imported from MSP430Ware 3.80.14.01.  

    I actually had to add _MPU_LOCK and _MPU_ENABLE_NMI to my test project and then was able to see all the bits set when I viewed the registers in the debugger.  

    Sounds like something strange happening in your project or your CCS.  Can you close and re-open CCS?  Can you try with the msp430fr59xx_mpu_01.c project from MSP430Ware?  

    Also, when searching E2E I found this good list of MPU resources going into all kinds of details about the MPU.  Just going to leave it here for any future people who stumble upon this thread.  

    Thanks,

    JD

  • Hi ,

    It works for me if I add "_MPU_LOCK" but if I don't add "_MPU_LOCK", the NMI setting gets lost. Can you please confirm that you see the same thing on your end?

    What happens on your end if you try the following:

    - Open project preferences -> command file preprocessing

    - Add "_MPU_ENABLE" and "_MPU_ENABLE_NMI" (without adding "_MPU_LOCK")

    - Hit "apply and close"

    - Open project preferences -> command file processing and check that "_MPU_ENABLE_NMI" option persisted

    In my case, if I try the above steps, the NMI setting gets lost completely...

    Thanks,

    Aamer

**Attention** This is a public forum