F28-F29 Software Migration Guide  1.00.00.00
ERAD

The ERAD IP in the F29 devices is an enhanced version of the IP present in F28 devices. Some of the key differences include :

  • Separate ownership configuration for individual submodules
  • Support for 64 bit compares (for data bus)
  • Support for Min and Max counts (F28 ERAD only supported max count)
  • HWBP is renamed to EBC. CTM is renamed to SEC
  • All the submodules registers are combined into a single registerfile. The EBC and SEC registers are available as registerfile arrays. Hence the indexing starts from 0, instead of 1 which was used in F28.
  • Reset value of SEC{#}.REF is 0xFFFFFFFF, while it is 0 in F28. Setting REF to 0 would cause counter match event to happen by default.
Note
CCS uses ERAD module for inserting all the hardware breakpoints in an F29 device. In C28 based devices, the first 2 HWBPs are implemented using the bus comparator modules present in the C28 CPU itself. The remaining HWBPs are implemented using the bus comparator in ERAD. In case of C29 based devices, all the HWBPs are implemented using ERAD. In order to avoid conflicts between application and debugger, it is recommended for application to start from EBC7.

Macro and enum mapping

Base address macros available in F28 devices :

  • ERAD_GLOBAL_BASE
  • ERAD_HWBP1_BASE - ERAD_HWBP8_BASE
  • ERAD_COUNTER1_BASE - ERAD_COUNTER4_BASE
  • ERAD_CRC_GLOBAL_BASE
  • ERAD_CRC1_BASE - ERAD_CRC8_BASE
  • ERAD_PCTRACE_BASE

In F29 devices, a single macro ERAD_BASE is provided. All the driverlib functions which expects the submodule base address as parameter has been updated to take in an enum as parameter instead. Refer to the Driverlib API mapping table for more details.

F28 Macro/Enum F28 Macro/Enum
ERAD_INST_BUSCOMP1-8 ERAD_INST_BUSCOMP0-7
ERAD_INST_COUNTER1-4 ERAD_INST_COUNTER0-3
ERAD_INST_CRC1-8 -
ERAD_BUSCOMP_BUS_VPC ERAD_BUSCOMP_BUS_VPC_I_ALIGNED / VPC_W_ALIGNED
ERAD_BUSCOMP_BUS_DRAB ERAD_BUSCOMP_BUS_DRAB_W
ERAD_EVENT_HWBP1-8 ERAD_EVENT_EBC0-7
ERAD_EVENT_COUNTER1_EVENT-COUNTER4_EVENT ERAD_EVENT_COUNTER0_EVENT-COUNTER3_EVENT
ERAD_EVENT_PIE_INT1-12 ERAD_EVENT_PIPE_INT/RTINT/NMI
ERAD_EVENT_TIMER0_TINT0-ERAD_EVENT_TIMER2_TINT2 ERAD_EVENT_CPU1/2/3_TIMER0/1/2_INT
ERAD_EVENT_DMACH1INT-ERAD_EVENT_DMACH6INT ERAD_EVENT_RTDMA1/2_CH1INT-ERAD_EVENT_RTDMA1/2_CH10INT
ERAD_EVENT_INPUTXBAR0-15 ERAD_EVENT_INPUTXBAR1-32
ERAD_AND_MASK1-4 ERAD_AND_MASK0-3
ERAD_OR_MASK1-4 ERAD_OR_MASK0-3
ERAD_CRC_QUAL_xx -
ERAD_PCTRACE_WINDOWED_QUAL_HWBP1..8 ERAD_PCTRACE_WINDOWED_QUAL_EBC0..7
ERAD_PCTRACE_WINDOWED_QUAL_HWBP_OR1..4 ERAD_PCTRACE_WINDOWED_QUAL_OR_MASK0..3
ERAD_PCTRACE_WINDOWED_QUAL_HWBP_AND1..4 ERAD_PCTRACE_WINDOWED_QUAL_AND_MASK..3
Note
The values of most of macros and enums are updated in the revised ERAD IP. In case hardcoded values were used instead of these macros/enums, please refer to the device TRM or switch to these macros/enums.

Differences in structs

  • ERAD_BusComp_Config
    • mask : 64-bit instead of 32-bit
    • reference : 64-bit instead of 32-bit
    • Additional configurations available. Please refer to the API guide for more details
  • ERAD_Profile_Params
    • busComp_base1 : renamed to busComp_instance1 and expects an enum of type ERAD_BusCompInstance instead of base address
    • busComp_base2 : renamed to busComp_instance2 and expects an enum of type ERAD_BusCompInstance instead of base address
    • counter_base : renamed to counter_instance and expects an enum of type ERAD_CounterInstance instead of base address
  • ERAD_Counter_Config
    • Additional configurations available. Please refer to the API guide for more details

Driverlib API mapping

F28 Function F29 Function Comments
ERAD_setOwnership ERAD_setOwnership Compatible. Configures ownership for all submodules to specified owner. Separate functions available for configuring individual ownerships.
ERAD_getOwnership - Not available. Separate functions available for each submodule
ERAD_resetCounter - Not available
ERAD_getHaltStatus - Not available
ERAD_getBusCompStatus ERAD_getBusCompStatus Parameter is an enum instead of base address
ERAD_clearBusCompEvent ERAD_clearBusCompEvent Parameter is an enum instead of base address
ERAD_getCounterStatus ERAD_getCounterStatus Parameter is an enum instead of base address
ERAD_configBusComp ERAD_configBusComp Parameter is an enum instead of base address
ERAD_configCounterInCountingMode ERAD_configCounterInCountingMode Parameter is an enum instead of base address
ERAD_configCounterInStartStopMode ERAD_configCounterInStartStopMode Parameter is an enum instead of base address
ERAD_configCounterInCumulativeMode ERAD_configCounterInCumulativeMode Parameter is an enum instead of base address
ERAD_configMask ERAD_configMask Additional parameter to configure nmi
ERAD_enableCounterResetInput ERAD_enableCounterResetInput Parameter is an enum instead of base address
ERAD_disableCounterResetInput ERAD_disableCounterResetInput Parameter is an enum instead of base address
ERAD_clearCounterEvent ERAD_clearCounterEvent Parameter is an enum instead of base address
ERAD_clearCounterOverflow ERAD_clearCounterOverflow Parameter is an enum instead of base address
ERAD_getCurrentCount ERAD_getCurrentCount Parameter is an enum instead of base address
ERAD_setCurrentCount ERAD_setCurrentCount Parameter is an enum instead of base address
ERAD_getMaxCount ERAD_getMaxCount Parameter is an enum instead of base address
ERAD_setMaxCount ERAD_setMaxCount Parameter is an enum instead of base address
ERAD_setCounterInputConditioning ERAD_setCounterInputConditioning Parameter is an enum instead of base address

C29 ERAD module does not support the CRC feature. Hence all the crc related functions are not available.

New functions added in F29 ERAD driverlb :

  • ERAD_getBusCompOwnership
  • ERAD_setBusCompOwnership
  • ERAD_getCounterOwnership
  • ERAD_setCounterOwnership
  • ERAD_getMaskOwnership
  • ERAD_setMaskOwnership
  • ERAD_getPCTraceOwnership
  • ERAD_setPCTraceOwnership
  • ERAD_enableBusCompModule
  • ERAD_disableBusCompModule
  • ERAD_enableCounterModule
  • ERAD_disableCounterModule
  • ERAD_getWatchpointPC
  • ERAD_getMinCount
  • ERAD_setMinCount