Update repo

This commit is contained in:
2026-08-30 23:04:35 -07:00
parent 749dab5721
commit ce65a0f59a
14950 changed files with 4408250 additions and 1 deletions
@@ -0,0 +1,57 @@
% var module = system.modules['/driverlib/sync.js'];
% let Common = system.getScript("/driverlib/Common.js");
% var nameOfModule = "sync";
% var nameOfPeripheral = module.peripheralName;
//*****************************************************************************
//
// SYNC Scheme Configurations
//
//*****************************************************************************
void `nameOfPeripheral`_init(){
%if (module != null)
%{
% var stat = module.$static
SysCtl_setSyncOutputConfig(`stat.syncOutSource`);
% if (stat.epwm1SyncInSource) {
//
// For EPWM1, the sync input is: `stat.epwm1SyncInSource`
//
% }
% if (stat.epwm1SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_EPWM4, `stat.epwm4SyncInSource`);
% }
% if (stat.epwm7SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_EPWM7, `stat.epwm7SyncInSource`);
% }
% if (stat.epwm10SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_EPWM10, `stat.epwm10SyncInSource`);
% }
% if (stat.ecap1SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_ECAP1, `stat.ecap1SyncInSource`);
% }
% if (stat.ecap4SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_ECAP4, `stat.ecap4SyncInSource`);
% }
% if (stat.ecap6SyncInSource) {
SysCtl_setSyncInputConfig(SYSCTL_SYNC_IN_ECAP6, `stat.ecap6SyncInSource`);
% }
% if (stat.ADCSOCAOutputSelect) {
//
// SOCA
//
SysCtl_enableExtADCSOCSource(`(stat.ADCSOCAOutputSelect.length > 0)?stat.ADCSOCAOutputSelect.toString().replace(/,/gi, "|"):0`);
% }
% if (stat.ADCSOCBOutputSelect) {
//
// SOCB
//
SysCtl_enableExtADCSOCSource(`(stat.ADCSOCBOutputSelect.length > 0)?stat.ADCSOCBOutputSelect.toString().replace(/,/gi, "|"):0`);
% }
% if (stat.ADCSOCOutputLock) {
SysCtl_lockExtADCSOCSelect();
% }
% if (stat.syncOutLock) {
SysCtl_lockSyncSelect();
% }
%}
}
@@ -0,0 +1,13 @@
% var moduleName = "sync"
% var module = system.modules['/driverlib/' + moduleName + '.js'];
%if (module != null)
%{
//*****************************************************************************
//
// SYNC Scheme Configurations
//
//*****************************************************************************
% for(var i = 0; i < module.$instances.length; i++) {
% var instance = module.$instances[i];
% }
%}
@@ -0,0 +1,99 @@
%%{
var epwmModule = system.modules['/driverlib/epwm.js'];
var syncModule = system.modules['/driverlib/sync.js'];
let Common = system.getScript("/driverlib/Common.js");
var nameOfPeripheral = epwmModule.peripheralName;
var syncStat = null;
if (syncModule){
syncStat = syncModule.$static
}
var ePWMInstances = Common.peripheralCount("EPWM")
var syncRenameSignal = {
EXTSYNCIN1 : "EXTSYNCIN1",
EXTSYNCIN2 : "EXTSYNCIN2",
EPWM1SYNCOUT : "SYNCOUT_EPWM1",
EPWM4SYNCOUT : "SYNCOUT_EPWM4",
EPWM7SYNCOUT : "SYNCOUT_EPWM7",
EPWM10SYNCOUT : "SYNCOUT_EPWM10",
ECAP1SYNCOUT : "SYNCOUT_ECAP1",
ECAP4SYNCOUT : "SYNCOUT_ECAP4",
INPUTXBAR_OUT5 : "EXTSYNCIN1",
INPUTXBAR_OUT6 : "EXTSYNCIN2",
}
function renameSignalIfExists(name)
{
if (syncRenameSignal[name])
{
return syncRenameSignal[name];
}
else
{
return name;
}
}
%%}
% for(var i = 0; i < epwmModule.$instances.length; i++) {
% var epwm_instance = epwmModule.$instances[i];
% let epwm_instancePinmux = epwm_instance["epwm"];
% let epwm_solution = epwm_instancePinmux.$solution;
% let epwm_peripheral = system.deviceData.peripherals[epwm_solution.peripheralName];
% let epwm_InstanceName = epwm_solution.peripheralName.toLowerCase();
% var timebase = epwm_instance;
% if (["F28002x", "F2838x"].includes(Common.getDeviceName())) {
`renameSignalIfExists(timebase.epwmTimebase_syncInPulseSource.replace("EPWM_SYNC_IN_PULSE_SRC_", ""))` -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% } else {
% if (syncModule) {
% if (epwm_InstanceName == "epwm1"){
% if (syncStat.epwm1SyncInSource)
% {
`syncRenameSignal[syncStat.epwm1SyncInSource.replace("SYSCTL_SYNC_IN_SRC_", "")]` -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% } else if (epwm_InstanceName == "epwm4"){
% if (syncStat.epwm4SyncInSource)
% {
`syncRenameSignal[syncStat.epwm4SyncInSource.replace("SYSCTL_SYNC_IN_SRC_", "")]` -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% } else if (epwm_InstanceName == "epwm7"){
% if (syncStat.epwm7SyncInSource)
% {
`syncRenameSignal[syncStat.epwm7SyncInSource.replace("SYSCTL_SYNC_IN_SRC_", "")]` -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% } else if (epwm_InstanceName == "epwm10"){
% if (syncStat.epwm1SyncInSource)
% {
`syncRenameSignal[syncStat.epwm10SyncInSource.replace("SYSCTL_SYNC_IN_SRC_", "")]` -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% } else if (epwm_InstanceName == "epwm2"){
SYNCOUT_EPWM1 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm3"){
SYNCOUT_EPWM2 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm5"){
SYNCOUT_EPWM4 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm6"){
SYNCOUT_EPWM5 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm8"){
SYNCOUT_EPWM7 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm9"){
SYNCOUT_EPWM8 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm11"){
SYNCOUT_EPWM10 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm12"){
SYNCOUT_EPWM11 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm14"){
SYNCOUT_EPWM13 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% else if (epwm_InstanceName == "epwm15"){
SYNCOUT_EPWM14 -> `epwm_InstanceName`_TB:`epwm_InstanceName`_syncin
% }
% }
% }
% }