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.

MSP432E401Y: Protected Area for all CAN registers in MSP432E4 MPU?

Part Number: MSP432E401Y

Hi All,

Some background:

"

My customer is looking for guidance about how to manage and use MPU on our MSP432E4.

What the customer is looking for is a guidance about how MPU works together with some basic example.

Target is to take a task and make it a Privileged one  ( let’s talk about it as a Kernel Task )

This Task can access only to a given RAM area ( CAN registers must to be included in this protected memory )

Other Tasks are forbidden to access to this protected area .

If I well understood the main target of the customer is to let only one task managing the CAN peripheral .

I think that an how to tailored on this could really help .

In the meantime customer already implemented something similar.

At the beginning of February they implemented a test application based on the change of setting of the MPU in correspondence of the context switch in order to verify its functioning on a conceptual level.

Since the experiment was successful customer decided to implement this system on the client application.

"

Question:

Last, I have a question about the MPU. 

We need to protect only the CAN message send operation, but registers involved in send operation are 7 (CAN_O_IF1CMSK, CAN_O_IF1MSK1, CAN_O_IF1MSK2, CAN_O_IF1ARB1, CAN_O_IF1ARB2,CAN_O_IF1MCTL, CAN_O_IF1CRQ) while the minimum size of a MPU region is 32 Bytes.
Have we to put in the protected area all CAN registers? 

Many Thanks,

Antonio

  • Hello,

    According to customer's target, I think the best would be that OS is able to change MPU settings dynamically in the scheduler in order to provide accesses privilege depending on the current context. That would make possible to define accessing ranges for each task/interrupt.

    However, there is no SYS/BIOS kernel support for dynamic MPU manipulation to protect an execution context on MSP432E4, only an “MPU” kernel module that is typically used to statically initialize an MPU at boot. 

    Good news is FreeRTOS has MPU supported version. Since the MPU is a feature of Cortex-M4F core, the FreeRTOS-MPU is compatible with MSP432E4.

    But we have no an available example. Customer need port it by themselves. Please see below page for more information.

    https://www.freertos.org/FreeRTOS-MPU-memory-protection-unit.html

    For the 7 CAN registers protection,  you need put more CAN registers into one MPU region.

**Attention** This is a public forum