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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

983件の閲覧回数
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 返答(返信)

638件の閲覧回数
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 件の賞賛

638件の閲覧回数
demian91
Contributor III

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

0 件の賞賛