Configuring FMU from ARM core

Can FMU be configured from ARM core for ADSP-SC59x processor?
  • Yes, FMU can be configured from the ARM core for the ADSP-SC59x processor.

    The SEC services from the Cross Core Embedded Studio 2.10.0 can be used to program the FMU on the ADSP-SC59x processor. We can use the below code to enable the system source and to enable the fault for a system source.

    #include <services/int/adi_sec.h>
    /* Enable the system source */
    adi_sec_EnableSource(uint32_t SID, bool bEnable);
    /* Enable fault for the given system source */
    adi_sec_EnableFault(uint32_t SID, bool bEnable);

    The SID value passed in the above function should be the same as the source interrupt ID value in the SHARC core and not that of the ARM core.

    For example, tools have provided the below macros for the WDOG0 interrupt.

    #define INTR_WDOG0_EXP                       (ADI_INTR_BASE + 3)		/* Expiration */
    #define SEC_WDOG0_EXP                          3		/* Expiration */

    If we are configuring WDOG0 as a fault source from the ARM core, we need to use the SEC_WDOG0_EXP macro only. If INTR_WDOG0_EXP macro is used, ARM core will add an offset of 32 to the WDOG0 interrupt ID value. This value doesn’t correspond to the WDOG0 interrupt for the SEC/FMU and will not be configured as a fault. To avoid this, we should use SEC interrupt macros when configuring fault sources from the ARM core.

    If we are configuring WDOG0 as fault from SHARC core, any of the two macros can be used, as INTR_WDOG0_EXP and SEC_WDOG0_EXP macro values will take the same value in SHARC core.

    Example code for FMU from ARM core can be found in released BSP examples.