Why eMIOS OPWFMB mode has no output?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Why eMIOS OPWFMB mode has no output?

跳至解决方案
1,369 次查看
Yumimi
Contributor II

I am using MPC5777C micro controller for my project development. I configure GPIO[189] as eMios output in the mode of OPWFMB on the platform  EB25.1.1.I am refering the problem How to use eMIOS OPWFMB mode? - NXP Community.

Here's my code:

eMIOS_0.MCR.B.GPREN = 0; /* Disable global prescaler (reset default) */
eMIOS_0.MCR.B.GPRE = 79; /* Divide 80 MHz clock to module by 80 */
eMIOS_0.MCR.B.FRZ = 0; /* No Freeze ch regs in debug mode if ch FREN=0 */
eMIOS_1.MCR.B.GPREN = 0; /* Disable global prescaler (reset default) */
eMIOS_1.MCR.B.GPRE = 79; /* Divide 80 MHz clock to module by 80 */
eMIOS_1.MCR.B.FRZ = 0; /* No Freeze ch regs in debug mode if ch FREN=0 */
eMIOS_0_UC.UC[18].C.R = 0x0; /* Disable channel prescaler (reset default) */
eMIOS_0_UC.UC[18].A.R = 20; /* OPWFMB mode: duty cycle count */
eMIOS_0_UC.UC[18].B.R = 200; /* OPWFMB mode: period will be 200 counts */
eMIOS_0_UC.UC[18].CNT.R = 1; /* OPWFMB start ctr betw 1 & B reg value*/
eMIOS_0_UC.UC[18].C.B.EDPOL = 1; /* Output polarity on A match */
eMIOS_0_UC.UC[18].C.B.MODE = 0x58; /* Output Pulse Width & Freq. Modulation*/
eMIOS_0_UC.UC[18].C.B.UCPRE = 0; /* Prescale channel clock by 0+1=1 */
eMIOS_0_UC.UC[18].C.B.UCPREN= 1; /* Enable prescaler */
eMIOS_0.MCR.B.GPREN = 1; /* Enable global prescaled clocks */
eMIOS_0.MCR.B.GTBE = 1; /* Enable global time base */
eMIOS_1.MCR.B.GPREN = 1; /* Enable global prescaled clocks */
eMIOS_1.MCR.B.GTBE = 1; /* Enable global time base */
Port_Init(&Port_Config);

Here's some registers related to the function:

Yumimi_0-1692785549968.png

Thanks for asking!

 

0 项奖励
回复
1 解答
1,314 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

eMIOS channel mapping is following

PetrS_1-1692862016105.png

So eMIOS18 is mapped with eMIOS_0 ch18 and available on pin GPIO197

PetrS_3-1692862034631.png

EMIOS10 is mapped to eMIOS_1 ch2 and available on the pin you configured; GPIO189 

PetrS_2-1692862028016.png

For I/O Signal Table refer to excel file attached to the MPC5777C reference manual.

BR, Petr

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,348 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems you are on wrong MCU pin. eMIOS_0 ch18 is multiplexed with GPIO[197] and so controlled by PCR[197].

BR, Petr

1,326 次查看
Yumimi
Contributor II

I use GPIO189 as EMIOS10,and how to map EMIOS10 to specific channel in Emios module?

I map EMIOS10 to emios0_18 according to EB25.1.1 EMOIS module‘s interrupt relationship.

 

0 项奖励
回复
1,315 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

eMIOS channel mapping is following

PetrS_1-1692862016105.png

So eMIOS18 is mapped with eMIOS_0 ch18 and available on pin GPIO197

PetrS_3-1692862034631.png

EMIOS10 is mapped to eMIOS_1 ch2 and available on the pin you configured; GPIO189 

PetrS_2-1692862028016.png

For I/O Signal Table refer to excel file attached to the MPC5777C reference manual.

BR, Petr

 

0 项奖励
回复