Other Parts Discussed in Thread: HALCOGEN
Tool/software:
Hello everyone,
I have carefully studied the following resources:
-
TMS570LS3137 Reference Manual
-
PWM Generation and Input Capture Using HALCoGen N2HET Module
-
NHET Getting Started Application Notes
I understand both the general and detailed concepts of generating PWM signals using the N2HET peripheral.
Below are my current configuration and observations:
-
VCLK2 clock: 160 MHz
-
HR Prescaler: 0 (HR Clock = 160 MHz)
-
LR Prescaler: 64 (Loop Resolution Period = 400 ns)
-
Time Slot: 64
After generating the N2HET code using HALCoGen, I made the following manual modifications:
-
PWCNT (Instruction 1):
-
Program field is modified to
0x000054C0Uto disable HR delay (I want the PWM resolution in multiples of the loop time, 400 ns. I do not need HR delay).
-
-
MOV64 (Instruction 41 - duty cycle update):
-
Data area is set to
256, My purpose is to have pulse changing on each 400ns.
-
-
MOV64 (Instruction 42 - period update):
-
Data area is set to
256, targeting an 800 ns total period.
-
After these changes, my perspective is that value located instruction 41 will be loaded to PWCNT data field and this data field will be decremented on each 400 ns(loop time). When it reaches zero, pin action will be performed and I am expecting that opposite pin action will be performed within 400 ns. Also, as Instruction 42 has 256 value, DJZ instruction data field will have 256 value and I am expecting that period will be 800ns.
As a result, after I performed following changes, I supposed that I will have a PWM signal with 800 ns period and %50 duty. However, I cannot take this pwm signal.
Could you help me identify precisely what I may have misunderstood or misconfigured? I am looking for specific guidance rather than general suggestions to ensure I grasp every detail I may have missed.



