|
AM263Px MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
33 #ifndef SOC_AM263PX_H_
34 #define SOC_AM263PX_H_
51 #include <drivers/hw_include/cslr_soc.h>
60 #define SOC_DOMAIN_ID_MAIN (0U)
64 #define MSS_CTRL_PARTITION0 (1)
65 #define TOP_CTRL_PARTITION0 (2)
66 #define CONTROLSS_CTRL_PARTITION0 (3)
69 #define MSS_RCM_PARTITION0 (4)
70 #define TOP_RCM_PARTITION0 (5)
77 #define KICK_LOCK_VAL (0x00000000U)
78 #define KICK0_UNLOCK_VAL (0x01234567U)
79 #define KICK1_UNLOCK_VAL (0x0FEDCBA8U)
82 #define ADC0_EXTCHSEL_BIT0 (0U)
83 #define ADC0_EXTCHSEL_BIT1 (1U)
84 #define ADC1_EXTCHSEL_BIT0 (2U)
85 #define ADC1_EXTCHSEL_BIT1 (3U)
86 #define ADC2_EXTCHSEL_BIT0 (4U)
87 #define ADC2_EXTCHSEL_BIT1 (5U)
88 #define ADC3_EXTCHSEL_BIT0 (6U)
89 #define ADC3_EXTCHSEL_BIT1 (7U)
90 #define ADC4_EXTCHSEL_BIT0 (8U)
91 #define ADC4_EXTCHSEL_BIT1 (9U)
92 #define ADC_R0_EXTCHSEL_BIT0 (10U)
93 #define ADC_R0_EXTCHSEL_BIT1 (11U)
94 #define ADC_R1_EXTCHSEL_BIT0 (12U)
95 #define ADC_R2_EXTCHSEL_BIT1 (13U)
98 #define ADC_EXTCHSELCT_DELAY_3_CYCLES (0U)
99 #define ADC_EXTCHSELCT_DELAY_6_CYCLES (1U)
101 #define CMPSS_LOOP_BACK_INH (0U)
102 #define CMPSS_LOOP_BACK_INL (1U)
107 int32_t status = (int32_t)-3;
109 if ((baseAddr == CSL_MCSPI0_U_BASE) || \
110 (baseAddr == CSL_MCSPI1_U_BASE) || \
111 (baseAddr == CSL_MCSPI2_U_BASE) || \
112 (baseAddr == CSL_MCSPI3_U_BASE) || \
113 (baseAddr == CSL_MCSPI4_U_BASE) || \
114 (baseAddr == CSL_MCSPI5_U_BASE) || \
115 (baseAddr == CSL_MCSPI6_U_BASE) || \
116 (baseAddr == CSL_MCSPI7_U_BASE) )
123 #define IS_I2C_BASE_ADDR_VALID(baseAddr) ((baseAddr == CSL_I2C0_U_BASE) || \
124 (baseAddr == CSL_I2C1_U_BASE) || \
125 (baseAddr == CSL_I2C2_U_BASE) || \
126 (baseAddr == CSL_I2C3_U_BASE))
132 int32_t status = (int32_t)(-3);
134 if (baseAddr == CSL_MMC0_U_BASE)
144 #define IS_OSPI_BASE_ADDR_VALID(baseAddr) (baseAddr == CSL_FLASH_CONFIG_REG8_U_BASE)
147 #define IS_OSPI_DATA_BASE_ADDR_VALID(baseAddr) (baseAddr == CSL_FLASH_DATA_REG0_U_BASE)
700 int32_t status = (int32_t)-3;
702 if(((baseAddr == CSL_UART0_U_BASE) ||
703 (baseAddr == CSL_UART1_U_BASE) ||
704 (baseAddr == CSL_UART2_U_BASE) ||
705 (baseAddr == CSL_UART3_U_BASE) ||
706 (baseAddr == CSL_UART4_U_BASE) ||
707 (baseAddr == CSL_UART5_U_BASE)))
void SOC_gateFsitxClock(uint32_t fsitxInstance)
Gate the FSI-TX clock.
void SOC_enableAdcReferenceMonitor(uint32_t adcInstance, uint32_t enable)
Enable ADC reference Monitors by writing to Control MMR.
int32_t SOC_moduleSetClockFrequency(uint32_t moduleId, uint32_t clkId, uint64_t clkRate)
Set module clock to specified frequency.
void Soc_disableEPWMHalt(uint32_t epwmInstance)
Halt EPWM with corresponding cPU.
void SOC_generateEcapReset(uint32_t ecapInstance)
Generate ECAP reset.
void SOC_ungateSdfmPllClock(uint32_t sdfmInstance)
Ungate the SDFM PLL clock.
void SOC_gateEcapClock(uint32_t ecapInstance)
Gate the ECAP clock.
void SOC_controlModuleUnlockMMR(uint32_t domainId, uint32_t partition)
Unlock control module partition to allow writes into control MMRs.
void SOC_selectAdcExtChXbar(uint32_t extChXbarOut, uint32_t extChXbarIn)
Selects the ADC External Channel Select bit for the output from each xbar out.
void SOC_selectIcssGpiMux(uint8_t pru_instance, uint32_t mask)
Selection of ICSS GPI MUX.
uint64_t SOC_virtToPhy(void *virtAddr)
SOC Virtual (CPU) to Physical address translation function.
void SOC_gateFsirxClock(uint32_t fsirxInstance)
Gate the FSI-RX clock.
void SOC_gateSdfmPllClock(uint32_t sdfmInstance)
Gate the SDFM PLL clock.
void SOC_gateCmpssaClock(uint32_t cmpssaInstance)
Gate the CMPSS-A clock.
void SOC_gateCmpssbClock(uint32_t cmpssbInstance)
Gate the CMPSS-B clock.
uint32_t SOC_getFlashDataBaseAddr(void)
This function gets the SOC mapped data base address of the flash.
void SOC_generateCmpssbReset(uint32_t cmpssbInstance)
Generate CMPSS-B reset.
void SOC_enableCmpssbDacLoopBack(uint32_t cmpssbInstance, uint32_t dacType, uint32_t enable)
Enable or disable the CMPSS - DAC Loop Back configuration.
void SOC_generateDacReset(void)
Generate DAC reset.
void SOC_enableAdcReference(uint32_t adcInstance)
Enable ADC references by writing to Control MMR.
void SOC_gateOttoClock(uint32_t ottoInstance)
Gate the OTTO clock.
void SOC_ungateDacClock(void)
Ungate the DAC clock.
void SOC_setMultipleEpwmTbClk(uint32_t epwmMask, uint32_t enable)
Enable or disable Multiple ePWM time base clock from Control MMR.
void SOC_setAdcOsdConfig(uint32_t adcInstance, uint32_t config)
Sets the ADC OSD Configuration.
void SOC_gateEqepClock(uint32_t eqepInstance)
Gate the EQEP clock.
void SOC_generateAdcReset(uint32_t adcInstance)
Generate ADC reset.
void SOC_ungateRdcClock(uint32_t rdcInstance)
Ungate the HW_RESOLVER clock.
void SOC_generateEpwmReset(uint32_t ePWMInstance)
Generate ePWM reset.
void * SOC_phyToVirt(uint64_t phyAddr)
Physical to Virtual (CPU) address translation function.
void SOC_ungateEcapClock(uint32_t ecapInstance)
Ungate the ECAP clock.
void SOC_gateDacClock(void)
Gate the DAC clock.
uint64_t SOC_getSelfCpuClk(void)
Get the clock frequency in Hz of the CPU on which the driver is running.
void SOC_enableAdcGlobalForce(uint32_t adcInstance, uint32_t enable)
Enable or Disable the ADC instnace for Gloabl SW force.
void SOC_enableAdcOsdChannel(uint32_t adcInstance, uint32_t channel, uint32_t enable)
Enable or disable the OSD circuit over the ADC channels.
void SOC_generateRdcReset(uint32_t rdcInstance)
Generate RDC reset.
void SOC_selectSdfm1Clk0Source(uint8_t source)
Select the SDFM1 CLK0 source.
void SOC_selextAdcExtChDelay(uint32_t delay)
Mux select to choose delay for ADC Extchsel.
static int32_t UART_IsBaseAddrValid(uint32_t baseAddr)
API to validate UART base address.
Definition: soc.h:698
void SOC_gateFsiPllClock(uint32_t fsiInstance)
Gate the FSI-TX PLL clock.
void SOC_ungateOttoClock(uint32_t ottoInstance)
Ungate the OTTO clock.
void SOC_ungateCmpssaClock(uint32_t cmpssaInstance)
Ungate the CMPSS-A clock.
void SOC_enableAdcInternalReference(uint32_t adcInstance, uint32_t enable)
Enables the ADC internal reference.
void SOC_gateAdcClock(uint32_t adcInstance)
Gate the ADC clock.
static int32_t MCSPI_lld_isBaseAddrValid(uint32_t baseAddr)
API to validate MCSPI base address.
Definition: soc.h:105
void SOC_controlModuleLockMMR(uint32_t domainId, uint32_t partition)
Lock control module partition to prevent writes into control MMRs.
void SOC_ungateSdfmClock(uint32_t sdfmInstance)
Ungate the SDFM clock.
void SOC_ungateAdcClock(uint32_t adcInstance)
ungate the ADC clock
int32_t SOC_moduleClockEnable(uint32_t moduleId, uint32_t enable)
Enable clock to specified module.
void SOC_generateCmpssaReset(uint32_t cmpssaInstance)
Generate CMPSS-A reset.
void SOC_generateSdfmReset(uint32_t sdfmInstance)
Generate SDFM reset.
void SOC_gateEpwmClock(uint32_t epwmInstance)
Gate the ePWM clock.
void SOC_ungateCmpssbClock(uint32_t cmpssbInstance)
Ungate the CMPSS-B clock.
void SOC_adcSocGlobalForce(uint32_t socNumber)
Triggers a global force for the SOC in enabled ADCs the ADCs may be enabled by using SOC_enableAdcGlo...
const char * SOC_getCoreName(uint16_t coreId)
Convert a core ID to a user readable name.
void SOC_setEpwmTbClk(uint32_t epwmInstance, uint32_t enable)
Enable or disable ePWM time base clock from Control MMR.
void SOC_setEpwmGroup(uint32_t epwmInstance, uint32_t group)
Configure the ePWM group.
void SOC_ungateEpwmClock(uint32_t epwmInstance)
Ungate the ePWM clock.
uint32_t SOC_getAdcReferenceStatus(uint32_t adcInstance)
Gets the Reference status.
void SOC_ungateEqepClock(uint32_t eqepInstance)
Ungate the EQEP clock.
void SOC_gateSdfmClock(uint32_t sdfmInstance)
Gate the SDFM clock.
void SOC_generateFsiRxReset(uint32_t fsirxInstance)
Generate FSI-RX reset.
void Soc_enableEPWMHalt(uint32_t epwmInstance)
Halt EPWM with corresponding cPU.
void SOC_generateEqepReset(uint32_t eqepInstance)
Generate EQEP reset.
void SOC_generateOttoReset(uint32_t ottoInstance)
Generate OTTO reset.
void SOC_sdfmClkLoopBackConfig(uint32_t sdfmInstance, uint32_t clkInstance, uint32_t defaultValue)
Sets the configuraion for the loopback control.
void SOC_gateRdcClock(uint32_t rdcInstance)
Gate the HW_RESOLVER clock.
void SOC_generateFsiTxReset(uint32_t fsitxInstance)
Generate FSI-TX reset.
static int32_t MMCSD_lld_isBaseAddrValid(uint32_t baseAddr)
API to validate MMCSD base addresses.
Definition: soc.h:129
void SOC_enableCmpssaDacLoopBack(uint32_t cmpssaInstance, uint32_t dacType, uint32_t enable)
Enable or disable the CMPSS - DAC Loop Back configuration.
void SOC_enableAdcDacLoopback(uint32_t enable)
Enable or Disable the ADC CAL Pin to loopback with DAC.