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.

DIN always remains as a "1" even though the Pin is configured as Output(DIR = 0xFFFFFFFF)

Other Parts Discussed in Thread: TMS570LS20216

Hello,

I tried to set the LED on TMS570LS20216 USB development board (HET pin used as LED drivers).

#define HET_DIR     (*(volatile UInt32 *)0xFFF7B84CUL)
#define HET_DOUT    (*(volatile UInt32 *)0xFFF7B854UL)
#define HET_PDR     (*(volatile UInt32 *)0xFFF7B860UL)

 

After i execute the code in the following attachment snapshot, i find that the "HET_DIN "is always remaining as 0x00000001.

So the pin(LED connected to HET0) never turns OFF.  Can you please let me know how to get rid of the Issue.

 

Thanks in advance,

Renjith George

  •  

     

    Sorry the attachment got missed in my initial posting. So reposted the same.

  • Hi Renjith,

    It seems like there's a chance the stick is defective, but before concluding this it would be worth checking some things.

    First, you might check the voltage on the LED with a meter - just to determine what the actual voltage is.  (i.e. 3.3V or 1.9V or 2.2V... the

    voltage might give a clue as to what's going on).

    Second, you might try refreshing the screen just to make sure the DOUT register hasn't changed to '1' for this bit.   This might have happened, because the NHET is activated by setting the TON bit in GCR (bit 0).  When you do this the NHET starts running whatever program is loaded in it's RAM. (or if nothing's loaded, it will still execute from the RAM but the results will be indeterminate).   

    When you have an NHET program running, if it causes a pin-action to set a pin high this will change the value in the DOUT register.   So if you refresh the above window, and see that DOUT has changed to 1 this would indicate that the NHET may have changed the pin state.

    The NHET should be stopped as far as I can tell because you have the IS bit set to '0' in HETGCR, but worth doing this check anyway as there could be some race going on between the debugger memory read and the NHET getting suspended.

    I can't think of anything else to check at the moment.  Getting the actual voltage might spur some ideas...  assuming it's not just that the NHET changed DOUT back to 1 behind the scenes and the display hasn't been updated.

    -Anthony