This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: IO ports controled by HET module flips occasionally

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Hi,Ti

when I moved the line: (void)memcpy((void*)hetRAM1,(const void*)het1PROGRAM

in het module init function :void hetInit(void) to the last line of funtion,het module works abnormal,the IO port flips occasionally, it makes sense?

  • Do you mean you "remove" the memcpy line? from hetInit()?

    (void)memcpy((void*)hetRAM1,(const void*)het1PROGRAM

    If the memcpy is removed from the init function, no code will be copied to HET RAM. The NHET pins should not be toggled after calling hetInit().   

  • Thanks QJ,

     not remove,just move this line to the end of function hetInit,then I find hetport flips occasionally when dsp works

  • The NHET contains RAM into which NHET code is loaded. The NHET timer micromachine reads and executes the instructions from the code in NHET RAM. 

    If you enabled the PWM output from NHET pins in HALCOGen NHET configuration, those pins will toggle after you run your code.

  • Thanks QJ,

    Not pwm io,if I move the line void)memcpy((void*)hetRAM1,(const void*)het1PROGRAM

     to the last line of hetInit function,the io flips while program has no operation on io ,

    if I restore this line to original position ,it works normally,so I suspect the position

    of this line has effect on program copy,is these reasonable?

    flips don't happen always,but occasionally

  • No, location of this instruction should not impact the pin's status.

    If you move the instruction to the last line (after nhetREG->GCR setting), and N2HET RAM is not initialized before calling hetInit(), the existing code (old code) in hetRAM will start execution after NHET is turned on (last instruction in hetInit(), hetGCR=0x1) before you copy the new code to nhet RAM.