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.

AM2634: How to ensure only one core has permissions to change CMPSS and SDFM comparator configurations

Part Number: AM2634

Tool/software:

Hi!

I am currently working with the 4 core AM2634, where I will be setting up one core to act as a "supervisory" core. To ensure the CMPSS and SDFM comparator functions are set correctly, i want only this supervisory core to set them up and ensure no other cores can change the settings. 

Is there a way to only give privilege to one core for CMPSS and SDFM comparator config? If so, could you please give a detailed explanation of how I can go about doing this. I cant seem to find documentation about this in particular.

Thank you!

  • Hi,

    1. Incase of multi-core R5F application architecture, we do not have any specific setting for marking a core as "Supervisor" or "Master" core. We do have ways to setup a memory firewall using the TIFS security offering (more granularity) or by using general ARM R5F MPU (Memory Protection Unit) (less granularity). This way you can configure only the R5FSS0-0 core with Read, Write Execute settings for the memory region of CMPSS and SDFM config registers, and for other cores, mark the region as Read-only (or If you want something like FreeRTOS-SMP (which is not directly achievable on R5F cores due to hardware being asymmetric), you can have multiple asks created on all 4 cores and have semaphores in shared memory and post/pend according to your application design, only difference would be that you cannot spawn a new task from other cores like in a true SMP environment.

      I am assuming you are already using TRM: Interprocessor Communication (IPC) to setup the multicore system.

      The best way to then give particular supervisor and user permissions should be through TRM: 3.12 System Memory Protection Unit (MPU)/Firewalls

    2. We also have Control Module Lock Mechanism(lock registers that can prevent unauthorized access to critical configuration registers.)

      // On supervisory core during initialization
      void supervisory_core_init_cmpss_sdfm(void)
      {
          // Unlock control module for initial configuration
          SOC_controlModuleUnlockMMR(SOC_DOMAIN_ID_MAIN, CONTROLSS_CTRL_PARTITION0);
          
          // Configure CMPSS instances
          configure_all_cmpss_instances();
          
          // Configure SDFM instances  
          configure_all_sdfm_instances();
          
          // Lock the control module - this prevents other cores from modifying
          SOC_controlModuleLockMMR(SOC_DOMAIN_ID_MAIN, CONTROLSS_CTRL_PARTITION0);
      }

    Let me know if any of these resolve your issue!

    Regards,
    Akshit

  • Great thanks Akshit! I'll test this out in the coming weeks and return back here if I have any difficulty with setup.