MPC5746R eMIOS - Pulse Counter Accumulation (PEA) - CNT Skip Numbers

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

MPC5746R eMIOS - Pulse Counter Accumulation (PEA) - CNT Skip Numbers

984 次查看
demian91
Contributor III

Hi i need to detect rising edges of a signal but for moments the register counter CNT (eMIOS_1.UC[UCHANNEL_17].CNT.B.CNT) that count to the register A (eMIOS_1.UC[UCHANNEL_17].A.B.A) for moments skips 1 number in the count form 0 to the value wrote in A.

The mode used is "Pulse/Edge Accumulation (continuous)".

I verified this disabling interrupts and only verifying in the main() that the register CNT counts by 1.

For example i have CNT = 0 - 1 - 2 - 3 - ??? - 5.

How is possible?

My code configure:

eMIOS_1.MCR.B.GTBE = OFF;
eMIOS_1.MCR.B.MDIS = 0;
eMIOS_1.MCR.B.FRZ = OFF;
eMIOS_1.MCR.B.ETB = 0;
eMIOS_1.MCR.B.SRV = 0; //Id de servidor

-eMIOS_1

-Channel 17

-Mode "Pulse/Edge Accumulation (continuous)" [MODE=8]

-Bus Counter A [BSL=0]

-1 Edge [EDSEL=0]

-Rising Edge [EDPOL=1]

-Prescaler Divide for 1 [UCPRE=0]

eMIOS_1.MCR.B.GTBE = ON;

I adjunt a 2 simple project verifying that:

Prueba_MPC5746R: It conmute pin PD1 for each 10 counts of PEA.

Prueba2_MPC5746R: Its the same but disable interrupts and verifying that counts bad for each increment of NErrorsI and the two numbers "CNTAuxI2" and "CNTAntAuxI2" are the bad count.

0 项奖励
2 回复数

639 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

how do  you read the values? Is your software fast enough to read all values? I have never seen that on my side. Do you have some simple project to reproduce it?

Regards,

Lukas

0 项奖励

639 次查看
demian91
Contributor III

I adjunt two samples. Prueba2_MPC5746R conmutes for each error count.

0 项奖励