-->Why is it that TGRA and TGRB cannot take values given to them directly? For eg:
If I declare mtu.TGRA=0xabcd;
It doesnt take value. When I pass it as argument through a function or use pointers then only it take values whereas for other registers like TMDR,TCR,TSR if I declare
mtu.TSR=0x12; Then e2studio takes values.
Also, noticed that TGRA,TGRB are 16 bit registers and rest TCR,TSR,TMDR are 8 bit. How to write values directly in 16 bit register? Is that even possible?
I need to generate PWM waveform using timers of RZ A1 M, required for backlight control in HMI. Kindly guide. Thank you.
In reply to Chris:
In reply to Rapunzel:
Yeah,i checked the STBCR. The value stored was 0x00 and according to your suggestion I made it 0x01 to stop clock supply to motot control PWM timer.Still the situation is same values are not getting written to TGRA and TGRB.Rest all registers like TCR,TIORH,TSR,TMDR values are been written. What I have written in the code is as per mentioned in the flowchart of USERmanual. Its a very simple program.Firstly, as the flow diagram mentions to specify the TCR. I have done that then it specifies to mention TIOR(like TIORH and TIORL).Then specify time period and duty cycle using TGRA,TGRB. After that setting mode TMDR . Lastly, TSTR enabling. I have followed all steps still TGRA,TGRB not taking values. Rest all registers take values as specified in program.
Also, the very first step is to stop the TSRT i.e. CST make zero or halt. That has been done.
---->No, want want a '0', not a '1'. If it is a '1', you cannot read/write any of the registers.
I got this point. I have kept it as 0 only.----->But, if you are seeing "FFFF", then it must be turned on (otherwise everything would just be 00s)I am seeing TGRA as 0xffff and TGRB as 0xffff whereas I have kept TGRA as 0x20 and TGRB as 0x10 in the program. ------>Below I am manually changing it in u-boot.Problem is that when I am debugging and checking values of TGRA and TGRB in I/O register window (in e2 studio).I can change value from there manually by entering values from keyboard BUT I want it to take values of TGRA and TGRB from the program.