Use Master Reload signal as the source for counter initialization

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

Use Master Reload signal as the source for counter initialization

跳至解决方案
2,545 次查看
thomaspham
NXP Employee
NXP Employee

Dear all,

I'm using MPC5744P and trying to use Master Reload signal from submodule 0 as the source for submodule 1 counter initialization.

In submodule 0, I set up reloading point as full-cycle reload and reload every 1 opportunity. As stated in RM "the period of the counter will be locked to the register reload frequency of submodule0". Therefore, I expected the submodule 1 counter to reset when it reaches the modulo value (VAL1) of submodule 0.

The problem here is the submodule 1 counter does not reset at the time master reload signal asserts and it count all the way up to 0xFFFF (maximum register value) then reset.

I'd like to ask if I'm misunderstanding anything or there should be some more configuration to make it work.

Thank you for reading!

标记 (3)
1 解答
2,333 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi Thomas,

yes it behaves as you described. In order to use Master reload to reinit counter the LDOK must be set again each time the reload happen.

Use rather Master sync signal to reinit other submodule's counter.

BR, Petr

在原帖中查看解决方案

4 回复数
2,333 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

did you select source of init signal for the counter using CTRL2[INIT_SEL] bits on submodule1.

Try FlexPWM_x.SUB[1].CTRL2.B.INIT_SEL = 0x1;

BR, Petr

2,333 次查看
thomaspham
NXP Employee
NXP Employee

Hi Petr, 

Thanks for your reply.

I did set INT_SEL bit to 1. 

I have attached my CTRL1 and CTRL2 registers set for both submodule 0 and 1.

MasterReloadCntInitialization.png

The result is while submodule 0 outputs expected pwm signal, submodule 1 counter always counts to overflow (0xFFFF)

BRs,

Thomas

0 项奖励
回复
2,334 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi Thomas,

yes it behaves as you described. In order to use Master reload to reinit counter the LDOK must be set again each time the reload happen.

Use rather Master sync signal to reinit other submodule's counter.

BR, Petr

2,333 次查看
thomaspham
NXP Employee
NXP Employee

Hi Petr,

I have tested and it works exactly like what you said.

Thank you very much.

BR,

Thomas

0 项奖励
回复