S12ZVML128 的GDU高侧没有PWM输出

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S12ZVML128 的GDU高侧没有PWM输出

1,354 Views
panda2022
Contributor II

我的板子上只有低侧有pwm的波形输出,高侧没有任何pwm波形输出

void Init_PMF(void)
{
PMFCFG0_WP =0;
//Edge aligned PWM
PMFCFG0_EDGEA = 1;
PMFCFG0_EDGEB = 1;
PMFCFG0_EDGEC = 1;

PMFCFG0_INDEPA=0;
PMFCFG0_INDEPB=0;
PMFCFG0_INDEPC=0;

PMFCFG0_MTG=0;
// PWM generator A generates reload event
PMFCFG2_REV0 = 1;
PMFCFG2_REV1 = 0;

// PMFCFG3_PINVA=1;
// PMFCFG2_MSK=0x3f;
// Low MOSFETs ON while SW control (Unipolar PWM)
PMFOUTB_OUT = 0xFF; //0X2A
PMFOUTC_OUTCTL = 0xFF; // 01 04 10
// Writing to value register zero also writes to value registers one to five
PMFCFG3_VLMODE = 0x01;

// Reload every PWM cycle
PMFFQCA = 0;

//PMFFQCB = 0; ///////////
// PWM clock = core clock / PWM_PRSCA = 25MHz / PWM_PRSCA
PMFFQCA_PRSCA = 0;

//PMFFQCB_PRSCB = PWM_PRSCA;//////
// Load modulo timer A
PMFMODA = 625;//1250=20kHZ
// Load dead time timer A
PMFDTMA = 13;

//PMFDTMB = PWM_DEADTIME;//////
//PMFVAL0=625;

// Mask all PWM outputs
PMFCFG2 |= 0x00;
// All outputs in Software mode(PMFOUTB)


// PMF external global load OK signal controls reload of double buffered registers
PMFENCA_LDOKA = 1;

// PWM restart at commutation event

// PMFENCB_RSTRTB = 1;/////
// PWM generator A outputs enabled
PMFENCA_PWMENA = 1;

//PMFENCB_PWMENB = 1;/////////

// Buffered PMFOUTC, PMFOUTB, SWAPx and MSKx change on commutation event
PMFCFG1_ENCE = 1;

// 0 = Local LDOKA controls buffered registers / 1 = external Load OK controls buffered registers
PMFENCA_GLDOKA = 1;

//PMFENCB_GLDOKB = 1; ///////PMFROIEA
}

 

 

void Init_GDU(void)
{
GDUF_GHHDF=0;
}

 

 

0 Kudos
5 Replies

1,260 Views
panda2022
Contributor II

我就是想同时打开6个pwm

0 Kudos

1,258 Views
panda2022
Contributor II

在GDU上同时输出6个pwm

0 Kudos

1,262 Views
panda2022
Contributor II

我在6个GUD的脚上已经接有MOSFETS了

0 Kudos

1,215 Views
ArchieLuo
Contributor III

兄弟,你这是什么应用?电机驱动吗?如果是6个独立的MOS,没有组成桥的话,需要考虑一下连接到HGx的管子的驱动问题,那个自举电容需要充电的。

建议你发一下你的原理图。

可以私聊我,一起探讨一下~

0 Kudos

1,319 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

one thing is PMF and another one is GDU. PMF can generate 6 independent PWMs at GPIO pins but GDU is specialized motor control oriented peripheral which does not allows you to swich-on at once top and bottom devices in the bridge leg.

 

So if you want ot generate 6 independent PWMs you have to use your own external driver for MOSFETS.

 

Best regard,

Ladislav

 

 

 

0 Kudos