MPC5746R eMIOS OPWFM immediate update

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

MPC5746R eMIOS OPWFM immediate update

702 Views
ceciliac
Contributor III

Hi, I am not able to get the immediate update working for OPWFM or OPWFMB. When I change mode to run update on next period it works as expected (second image below). In my test I change the period each 100ms and the period toggles between the two values 800 and 0xFFF. When running on immediate update the period becomes very large (first image below). What is required to make immediate update working??

Another question: What is the maximum frequency that can be used for eMIOS? I would like to have a period time of 1 microsecond, but when testing I can't get it to be less than 2 us.

I am running the eMIOS on 100 MHz and I have the following configuration:

eMIOS_0.MCR.B.MDIS = 0; // enable modul
eMIOS_0.MCR.B.GPRE = 9; // set global divider
eMIOS_0.MCR.B.GPREN = 0; // disable global prescaler

eMIOS_0.C14.B.UCPREN = 0; // disable channel prescaler
eMIOS_0.A14.B.A = 400;
eMIOS_0.B14.B.B = 800;
eMIOS_0.C14.B.BSL = 3; // set internal clock as clock source
eMIOS_0.C14.B.MODE = 0x19; //Flag on B update on next period, requires FORCMB
//eMIOS_0.C14.B.MODE = 0x18; // Not working
eMIOS_0.C14.B.EDPOL = 0; // triggering on a rising edge
eMIOS_0.C14.B.UCPRE = 0; // set channel prescaler
eMIOS_0.C14.B.UCPREN = 1; // enable channel prescaler
eMIOS_0.C14.B.FEN = 1;

eMIOS_MODE18.png

eMIOS_MODE19.png

Thanks,

Cecilia

2 Replies

509 Views
ceciliac
Contributor III

Hi, yes that could be the case but it also happens in buffered mode ....

If I need to set the FORCMB for immediate update then what is the difference between using immediate update and not using it. I seems they will behave the same way..?

0 Kudos

509 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Cecilia,

most probably a counter-wrap condition happens for your non-buffered mode. See more in chapter 2.4 of the

https://www.nxp.com/docs/en/engineering-bulletin/EB651.pdf

 

Generated frequency in OPWFM/OPWFMB mode is eMIOS_clk/(global prescaler +1)/(internal prescaler+1)/B_register.

BR, Petr