Hi TI,
I am using TMS570LC4357 to Generate a SENT Waveform as shown below using N2HET peripheral with HTU Module.
Here I had made all the configurations for both N2HET and HTU as defined below.
N2HET Configuration:
VCLK2 = 100MHz
HR Prescalar = 50
LR Prescalar = 2;
So=> HRP = 500ns and LRP = 1us;
and HR Cycles per LRP = 2;
HTU1 Configuration:
1. DCP0 is enabled.
2. Buffer full Interrrupt is disabled.
DCP0 Configuration:
DCP0 Element count = 1;
DCP0 Frame count = 20;
DCP0 Direction = Main RAM To N2HET RAM
DCP0 transfer = 32 bit transfer
DCP0 ADDMH = 16 byte
DCP0 ADDFM = post-increment main memory
TMBA = Circular buffer
TMBB = One Shot Buffer (not used)
IHADDR = (0x6)<<2; // Data field of Second N2HET Instruction.
And my N2HET Program is
_3us DJZ {next=_3us, cond_addr=Tick, reg=A, data=2}
Tick DJZ {next=Reload, reqnum=0, request=genreq,cond_addr=Shift, data=4, reg=A}
Shift SHFT{next=ChkShift, reg=B, smode=OR0, cond=UNC, pin=0, irq=OFF, data=0xAAAAA}
ChkShift ECMP {next=Reload, cond_addr=ShiftCnt, reg=B, en_pin_action=OFF, pin=0, data=0, hr_lr=LOW}
ShiftCnt MOV32{next=Reload, remote=Shift, data=0xAAAAA, z_cond=OFF, init=OFF, type=IMTOREG&REM, reg=A}
Reload MOV32 {next=_3us, remote=_3us, data=2, z_cond=OFF, init=OFF, type=IMTOREG&REM,reg=A}
That's all my set up.
NOTE:
According to this setup, HTU1 DCP[0] will be get triggered again and again at least after 15us (minimum case).
So HTU has at least 15us time span to complete it's transmission from the instance it gets the trigger (minimum case).
I refer the N2HET and HTU appnote from TI. (spna217.pdf, spna130a.pdf and TMS570LC4357 trm also)
I have read these documents many times.
But still I can not predict what is the error I have made.
Please anybody guide me to correctly utilize this HTU module and N2HET.
I have attached my CCS project, and HETIDE Project with this post.
Please help me to resolve this problem soon.
Thanks in advance.
Regards,
Karthikeyan.K