Hello
Dose the 'NOTE' mean that CLENR_MD must be set at 1 ?
Also, corrding to this, the max rate at which WGM transmits data to the DAC is 2M/s(WGM_CLK/40)?
However, corrding to the example figure above, the rate at which WGM transmits data to the DAC is the same as WGM_CLK.
So, I want to know what is the max rate at which WGM transmits data to the DAC? Must the CLENR_MD be set as 1?
Regards
Hai
Hi Hai,
I'm working on WGM example for S32R274 - which has slightly different WGM module, but the config is usable also for MPC5775K.
So, CLENR_MD register select mode how the CLENR value is used. When CLENR_MD is set to 0, CLENR value is used as power of 2 divider and only 4 lower bits from CLENR are taken. When CLENR_MD is set to 1 - CLNER value is taken as a decimal number.
For example - WGM clock is 80MHz, CLENR_MD is 0 and CLENR is 000000 (bin) - DAC is fed on 80 MHz (but DAC is able take data up to 2Mbps). When you store into CLNER 000001 clock is divided by 2, for 000011 in CLNER is clock divided by 8 and so on. To make DAC happy (for MPC5775K) - you need to divide 80MHz at least by 40 or more. For 2Mbps - you need to divide clock by 40 exactly - but 40 can't be get by pwr of 2.
For that, you need to switch CLENR_MD to decimal mode -> CLENR_MD = 1, and set decimal 40 into CLENR -> CLNER = 101000 (bin). I didn't test this config yet on board - but I hope it works.
Jiri
Hello Hai,
unfortunately, I am Radar module expert, so your question is out of my knowledge scope. I forwarded this question to my colleague. I hope, he will answer you soon.
Regards,
Martin