The sysctl driver in F29 devices are split into 3 header files - clockconfig.h, watchdog.h, sysctl.h.
Clock Configuration :
Watchdog :
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 :
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 :
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.
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.
Instead the following functions are provided in F29 Sysctl driverlib :
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 :
The following functions related to LFU has been removed.
New functions added in F29 Sysctl driverlib :