F28-F29 Software Migration Guide  1.00.00.00
Sysctl/Watchdog

The sysctl driver in F29 devices are split into 3 header files - clockconfig.h, watchdog.h, sysctl.h.

Clock Configuration :

  • The PLL module remains the same across F28P65x and F29H85x devices. However the driverlib APIs have been updated. Please refer to the Driverlib API mapping table for more details.
  • All the clock configuration registers are moved to DevCfgRegs. Application using bitfields based code should update the code accordingly, or use driverlib APIs. These registers are only writable to CPU1 (In case SSU is used, Only CPU1 LINK2 has access)
  • LSPCLK (Low speed Clock) domain which was clocking the SPI and SCI modules is not present in F29H85x device. It is directly clocked using SYSCLK. Application code must be updated to use the correct prescaler for the required SPI/SCI baudrate.

Watchdog :

  • Watchdog IP remains the same and all the APIs are compatible with F28.
  • Watchdog interrupt was using INT_WAKE channel in F28 devices. In F29 devices, there are separate interrupt channels for INT_WAKE and INT_WD.

Peripheral Frames

All the peripherals in the F29 devices are mapped across 4 frames. The frame selection configuration mechanism allows non-conflicting initiator to target accesses complete faster and without arbitration stalls. For more details about this feature, please refer to the device TRM. The hw_memmap.h header file provides macro functions for peripheral base addresses. The actual base address can be defined by passing the frameID to this macro function. By default, all peripherals are mapped to frame 0. To move a peripheral to a different frame, user needs to do the following steps :

  • Define a macro named USE_PERIPHERAL_FRAMES
  • Add a header file named "peripheral_frame_mapping.h" and define the base address macros in this file.
  • Configure the sysctl registers. Driverlib function SysCtl_selectFrameForPeripheral can be used.

Eg: Macro function definition in hw_memmap.h : #define EPWM1_BASE_FRAME(i) (0x70000000U + ((i) * 0x400000U))

Default mapping used in hw_memmap.h : #ifndef EPWM1_BASE #define EPWM1_BASE EPWM1_BASE_FRAME(0U) #endif

User can override this configuration by defining the following in peripheral_frame_mapping.h :

  • #define EPWM1_BASE EPWM1_BASE_FRAME(3U)

In the Sysconfig tool, the frame configuration UI is added for all the peripherals. The tool autogenerates the peripheral_frame_mapping.h file and the Sysctl register settings.

Driverlib API mapping

The following tables lists differences in driverlib APIs available in these devices :

F28 Function F29 Function Comments
SysCtl_selectCPUForPeripheralInstance SysCtl_selectCPUForPeripheral Renamed to SysCtl_selectCPUForPeripheral function.
SysCtl_getResetCause SysCtl_getResetCause API name and usage is compatible. The list of reset causes in the device is different. Refer to the API guide for more details.
SysCtl_clearResetCause SysCtl_clearResetCause API name and usage is compatible. The list of reset causes in the device is different. Refer to the API guide for more details.
SysCtl_simulateReset SysCtl_simulateReset F28 function has reset cause as input parameter. In F29, the input parameter is removed, since there is a single reset cause that can be simulated.
SysCtl_setClock SysCtl_setClock Not compatible. Separate parameters (available as enums) instead of one 32-bit parmaetr with all configurations ORed together. Refer to the API guide for more details.
SysCtl_setEPWMClockDivider SysCtl_setEPWMClock Function rename
SysCtl_setEMIF1ClockDivider SysCtl_setEMIF1Clock Function rename
SysCtl_setLINAClockDivider SysCtl_setLINAClock Function rename
SysCtl_setLINBClockDivider SysCtl_setLINBClock Function rename
SysCtl_selectClockOutSource SysCtl_setXClk Single function for configuring the clock source and divider
SysCtl_setXClk SysCtl_setXClk Single function for configuring the clock source and divider
SysCtl_setECatClk SysCtl_setECatClock Function rename
SysCtl_setMCANClk SysCtl_setMCANClock Single function for configuring the clock source and divider
SysCtl_setCputimer2Clk SysCtl_setCputimer2Clock Single function for configuring the clock source and divider
SysCtl_CLBClkConfig SysCtl_setCLBClock Function rename
SysCtl_turnOnOsc SysCtl_turnOnXTAL Function rename since XTAL is only input option
SysCtl_turnOffOsc SysCtl_turnOffXTAL Function rename since XTAL is only input option
SysCtl_enableLPMWakeupPin SysCtl_enableLPMWakeupPin In F28, the input is an integer corresponding to the GPIO number. In F29, the input is an enum
SysCtl_disableLPMWakeupPin SysCtl_disableLPMWakeupPin In F28, the input is an integer corresponding to the GPIO number. In F29, the input is an enum
SysCtl_enableCMPSSLPMWakeupPin SysCtl_enableLPMWakeupPin Same function is used for configuring GPIO/CMPSS as wakeup pin
SysCtl_disableCMPSSLPMWakeupPin SysCtl_disableLPMWakeupPin Same function is used for configuring GPIO/CMPSS as wakeup pin
SysCtl_delay SysCtl_delay Total cycles taken by the function is different. In C29, it takes 4 cycles per iteration plus 11 cycles. In C28, it takes 5 cycles per iteration plus 9 cycles. The macro DEVICE_DELAY_US(x) will remain compatible
SysCtl_setPLLSysClk - No separate function. Configurable using SysCtl_setClock function
SysCtl_setExternalOscMode - No separate function. Configurable using SysCtl_setClock function
SysCtl_setAuxPLLClk - AUXPLL is not available in F29 devices
SysCtl_getAuxClock - AUXPLL is not available in F29 devices
SysCtl_setAuxClock - AUXPLL is not available in F29 devices
SysCtl_setLowSpeedClock - LSPCLK domain is not available in F29 devices. The peripherals are directly clocked using SYSCLK.
SysCtl_getLowSpeedClock - LSPCLK domain is not available in F29 devices. The peripherals are directly clocked using SYSCLK.
SysCtl_resetDevice - Not available. SysCtl_simulateReset can be used instead.
SysCtl_enterHaltMode - Halt mode is not supported in the device. It supports IDLE and STANDBY modes.
SysCtl_enableWatchdogInHalt - Halt mode is not supported in the device.
SysCtl_enableWatchdogStandbyWakeup - Not applicable. In F29 devices, any interrupt can wake up the device from STANDBY Mode.
SysCtl_disableWatchdogStandbyWakeup - Not applicable. In F29 devices, any interrupt can wake up the device from STANDBY Mode.
SysCtl_setPeripheralAccessControl - Not supported. Access control can be enabled using SSU or RTDMA MPU module.
SysCtl_getPeripheralAccessControl - Not supported. Access control can be enabled using SSU or RTDMA MPU module.
SysCtl_getCPU2ResetStatus - Not supported. Use function SysCtl_isCPU2Reset to get the CPU reset status
SysCtl_clearCPU2ResetStatus - Not supported.
SysCtl_setSemOwner - Not supported. Clock config registers are only writable by CPU1.
SysCtl_getSemOwner - Not supported. Clock config registers are only writable by CPU1.
SysCtl_getPIEVErrAddr - Not applicable.
SysCtl_enableLockStep - Not supported. Lockstep is enabled by default. Once disabled, cannot be enabled back.
SysCtl_getLCMErrorFlag - Not supported.
SysCtl_clearLCMErrorFlag - Not supported.
SysCtl_setLCMErrorFlag - Not supported.
SysCtl_getRegParityErrorFlag - Not supported.
SysCtl_clearRegParityErrorFlag - Not supported.
SysCtl_setRegParityErrorFlag - Not supported.
SysCtl_allocateFlashBank - Not applicable. Flash bank allocation is done in BANKMGMT sector
SysCtl_allocateDxRAM - Not applicable. All RAMs are accessible to all CPUs
SysCtl_lockDxRAMConfig - Not applicable.
SysCtl_getDeviceUID0 - Not supported.
SysCtl_getDeviceUID1 - Not supported.
SysCtl_controlCPU2Reset SSU_controlCPUReset Moved to SSU driver. Refer to API guide for more details
SysCtl_configureType - Not supported.
SysCtl_isConfigTypeLocked - Not supported.

The following functions for locking the registers are removed.

  • SysCtl_lockExtADCSOCSelect
  • SysCtl_lockSyncSelect
  • SysCtl_lockClkConfig(reg)
  • SysCtl_lockSysConfig(reg)
  • SysCtl_lockAccessControlRegs
  • SysCtl_lockCPUSelectRegs(reg)
  • SysCtl_lockConfigRegs(reg)
  • SysCtl_lockErrControl

Instead the following functions are provided in F29 Sysctl driverlib :

  • SysCtl_lockRegister - Enums available for each of the registers that can be locked.
  • SysCtl_lockAllPeriphConfigRegisters
  • SysCtl_lockAllPeriphConfigRegisters
  • SysCtl_lockAllMCUCNFRegisters
  • SysCtl_lockAllClockConfigRegisters

In F29 devices, NMI is handled as part of ESM module. It also does not support SYS_ERR interrupt. All the error events tied to this interrupt channel are connected to ESM module. User may configure the error events to cause an NMI / Interrupt / Error pin influence or other events in the ESM module Please refer to API guide for more details on ESM driver APIs. The following functions related to NMI and SYS_ERR interrupt are removed :

  • SysCtl_enableNMIGlobalInterrupt
  • SysCtl_getNMIStatus
  • SysCtl_getNMIFlagStatus
  • SysCtl_isNMIFlagSet
  • SysCtl_clearNMIStatus
  • SysCtl_clearAllNMIFlags
  • SysCtl_forceNMIFlags
  • SysCtl_getNMIWatchdogCounter
  • SysCtl_setNMIWatchdogPeriod
  • SysCtl_getNMIWatchdogPeriod
  • SysCtl_getNMIShadowFlagStatus
  • SysCtl_isNMIShadowFlagSet
  • SysCtl_isErrorTriggered
  • SysCtl_getErrorPinStatus
  • SysCtl_forceError
  • SysCtl_clearError
  • SysCtl_selectErrPinPolarity
  • SysCtl_lockErrControl
  • SysCtl_getInterruptStatus
  • SysCtl_clearInterruptStatus
  • SysCtl_setInterruptStatus
  • SysCtl_getInterruptStatusMask
  • SysCtl_setInterruptStatusMask

The following functions related to LFU has been removed.

  • SysCtl_setLFUCPU
  • SysCtl_getLFUCPU
  • SysCtl_setLFUCLA1
  • SysCtl_getLFUCLA1
  • SysCtl_swapPieVectorAndLS01
  • SysCtl_swapPieVector
  • SysCtl_isPieVectorSwap
  • SysCtl_swapLS01
  • SysCtl_isLS01Swap
  • SysCtl_setLFUUserRegister
  • SysCtl_getLFUUserRegister
  • SysCtl_lockLFUConfigRegister
  • SysCtl_lockLFUUserRegister
  • SysCtl_unlockLFUConfigRegister
  • SysCtl_unlockLFUUserRegister
  • SysCtl_commitLFUConfigRegister
  • SysCtl_commitLFUUserRegister

New functions added in F29 Sysctl driverlib :

  • SysCtl_selectFrameForPeripheral
  • SysCtl_getPeripheralFrame
  • SysCtl_enableStandbyForPeripheral
  • SysCtl_disableStandbyForPeripheral
  • SysCtl_enableDebugHaltForPeripheral
  • SysCtl_disableDebugHaltForPeripheral
  • SysCtl_enableESMResetCauses
  • SysCtl_disableESMResetCauses
  • SysCtl_isCPU3Reset
  • SysCtl_getCPU3LPMStatus
  • SysCtl_getCPUID
  • SysCtl_enableSafetyInterconnect
  • SysCtl_disableSafetyInterconnect
  • SysCtl_enableEPWMXLINK
  • SysCtl_disableEPWMXLINK
  • SysCtl_setHSMClock