Loading ...
Sorry, an error occurred while loading the content.

HET errors

Expand Messages
  • rudypinal
    Hello, I am trying to program an HET for the TMS470R1B1M using IAR Embedded Workbench. While in the debugger, I am seeing that it looks like the different HET
    Message 1 of 3 , Jun 10, 2008
    • 0 Attachment
      Hello,

      I am trying to program an HET for the TMS470R1B1M using IAR Embedded
      Workbench. While in the debugger, I am seeing that it looks like the
      different HET addresses are being accessed (HETADDR keeps changing
      everytime or almost everytime I take a "next statement"). However, I
      am not seeing my outputs and inputs (HETDOUT/HETDIN) change. All the
      program is supposed to be doing is changing 3 of the outputs from high
      to low and back every half millisecond. Is there something that I am
      supposed to be initializing for my HET outputs and inputs to be
      changing, other than HETGCR, HETPRY, and HETDIR?

      An example of my initialization is:

      HETinit.cpp

      __no_init volatile HETPROGRAM0_UN e_HETPROGRAM0_UN @ 0x00800000;

      void MemCopy32(unsigned long *dst, unsigned long *src, int bytes);

      void HET_init()
      {
      HETGCR = 0x00000000;
      HETPFR = 0x104;
      HETDIR = 0x00000038;
      HETDCLR = 0xFFFFFFFF;
      MemCopy32((unsigned long *)&e_HETPROGRAM0_UN, (unsigned long
      )HET_INIT0_PST, sizeof(HET_INIT0_PST));
      }

      void Interrupt_Init()
      {
      HETPRY = 0x381;
      HETGCR |= 65541;
      }

      Currently, the reason I think that it might be an initialization error
      of the ports is because in some examples that I have seen on the
      example IAR code, I see a statement like "_disable_interrupt()", but I
      have not been able to locate what this function does at the beginning
      of the initialization. Also, I have read that there could be a
      REQMASK that I might need to set.

      Best Regards,
      Rudy
    • Steven Leiphart
      You need to provide your HET program too. That is where the HET execution occurs. You are discussing bugs in your cereal but only provided a picture of the
      Message 2 of 3 , Jun 10, 2008
      • 0 Attachment
        You need to provide your HET program too. That is where the HET execution
        occurs. You are discussing bugs in your cereal but only provided a picture
        of the cereal box... 8-)

        Also, from what it sounds like you are trying to do, you don't appear to
        need a HET interrupt at all. So that may just be causing you extra
        confusion. The interrupt service is only to tell your C application program
        that something happened in the HET and allow it to take some action. It
        doesn't actually "cause" anything in the HET program to do anything.

        Also, again, the HET assembler if used in its default IAR sample setup does
        not create a listing to tell you where bugs in the HET program are. If you
        right click on the .HET program in your workspace and select options. (You
        must not be actively debugging at the time or the options selection will be
        grayed out.)

        You should see something similar to this in the Custom Tool Config tab:

        het470wrap "$FILE_DIR$" "$TOOLKIT_DIR$\bin\het470" -i -l -hc $FILE_FNAME$
        $FILE_BNAME$

        If your's doesn't have the -l (that is a lower case L) they you won't get
        a listing. If you add the -l, a file will appear in your main source folder
        with the suffix .lst which will be the output listing of the HET assembler.
        This listing will include a normal post-compile source listing including
        errors. Finding this saved lots of trial and error HET program changes.

        Hope this helps,
        Steve.



        -----Original Message-----
        From: TMS470_ARM@yahoogroups.com [mailto:TMS470_ARM@yahoogroups.com] On
        Behalf Of rudypinal
        Sent: Tuesday, June 10, 2008 9:38 AM
        To: TMS470_ARM@yahoogroups.com
        Subject: [TMS470_ARM] HET errors

        Hello,

        I am trying to program an HET for the TMS470R1B1M using IAR Embedded
        Workbench. While in the debugger, I am seeing that it looks like the
        different HET addresses are being accessed (HETADDR keeps changing
        everytime or almost everytime I take a "next statement"). However, I
        am not seeing my outputs and inputs (HETDOUT/HETDIN) change. All the
        program is supposed to be doing is changing 3 of the outputs from high
        to low and back every half millisecond. Is there something that I am
        supposed to be initializing for my HET outputs and inputs to be
        changing, other than HETGCR, HETPRY, and HETDIR?

        An example of my initialization is:

        HETinit.cpp

        __no_init volatile HETPROGRAM0_UN e_HETPROGRAM0_UN @ 0x00800000;

        void MemCopy32(unsigned long *dst, unsigned long *src, int bytes);

        void HET_init()
        {
        HETGCR = 0x00000000;
        HETPFR = 0x104;
        HETDIR = 0x00000038;
        HETDCLR = 0xFFFFFFFF;
        MemCopy32((unsigned long *)&e_HETPROGRAM0_UN, (unsigned long
        )HET_INIT0_PST, sizeof(HET_INIT0_PST));
        }

        void Interrupt_Init()
        {
        HETPRY = 0x381;
        HETGCR |= 65541;
        }

        Currently, the reason I think that it might be an initialization error
        of the ports is because in some examples that I have seen on the
        example IAR code, I see a statement like "_disable_interrupt()", but I
        have not been able to locate what this function does at the beginning
        of the initialization. Also, I have read that there could be a
        REQMASK that I might need to set.

        Best Regards,
        Rudy
      • rudypinal
        ... execution ... picture ... program ... setup does ... If you ... options. (You ... will be ... $FILE_FNAME$ ... won t get ... source folder ... assembler.
        Message 3 of 3 , Jun 10, 2008
        • 0 Attachment
          --- In TMS470_ARM@yahoogroups.com, "Steven Leiphart" <Steven@...> wrote:
          >
          > You need to provide your HET program too. That is where the HET
          execution
          > occurs. You are discussing bugs in your cereal but only provided a
          picture
          > of the cereal box... 8-)
          >
          > Also, from what it sounds like you are trying to do, you don't appear to
          > need a HET interrupt at all. So that may just be causing you extra
          > confusion. The interrupt service is only to tell your C application
          program
          > that something happened in the HET and allow it to take some action. It
          > doesn't actually "cause" anything in the HET program to do anything.
          >
          > Also, again, the HET assembler if used in its default IAR sample
          setup does
          > not create a listing to tell you where bugs in the HET program are.
          If you
          > right click on the .HET program in your workspace and select
          options. (You
          > must not be actively debugging at the time or the options selection
          will be
          > grayed out.)
          >
          > You should see something similar to this in the Custom Tool Config tab:
          >
          > het470wrap "$FILE_DIR$" "$TOOLKIT_DIR$\bin\het470" -i -l -hc
          $FILE_FNAME$
          > $FILE_BNAME$
          >
          > If your's doesn't have the -l (that is a lower case L) they you
          won't get
          > a listing. If you add the -l, a file will appear in your main
          source folder
          > with the suffix .lst which will be the output listing of the HET
          assembler.
          > This listing will include a normal post-compile source listing including
          > errors. Finding this saved lots of trial and error HET program changes.
          >
          > Hope this helps,
          > Steve.
          >
          >
          >
          > -----Original Message-----
          > From: TMS470_ARM@yahoogroups.com [mailto:TMS470_ARM@yahoogroups.com] On
          > Behalf Of rudypinal
          > Sent: Tuesday, June 10, 2008 9:38 AM
          > To: TMS470_ARM@yahoogroups.com
          > Subject: [TMS470_ARM] HET errors
          >
          > Hello,
          >
          > I am trying to program an HET for the TMS470R1B1M using IAR Embedded
          > Workbench. While in the debugger, I am seeing that it looks like the
          > different HET addresses are being accessed (HETADDR keeps changing
          > everytime or almost everytime I take a "next statement"). However, I
          > am not seeing my outputs and inputs (HETDOUT/HETDIN) change. All the
          > program is supposed to be doing is changing 3 of the outputs from high
          > to low and back every half millisecond. Is there something that I am
          > supposed to be initializing for my HET outputs and inputs to be
          > changing, other than HETGCR, HETPRY, and HETDIR?
          >
          > An example of my initialization is:
          >
          > HETinit.cpp
          >
          > __no_init volatile HETPROGRAM0_UN e_HETPROGRAM0_UN @ 0x00800000;
          >
          > void MemCopy32(unsigned long *dst, unsigned long *src, int bytes);
          >
          > void HET_init()
          > {
          > HETGCR = 0x00000000;
          > HETPFR = 0x104;
          > HETDIR = 0x00000038;
          > HETDCLR = 0xFFFFFFFF;
          > MemCopy32((unsigned long *)&e_HETPROGRAM0_UN, (unsigned long
          > )HET_INIT0_PST, sizeof(HET_INIT0_PST));
          > }
          >
          > void Interrupt_Init()
          > {
          > HETPRY = 0x381;
          > HETGCR |= 65541;
          > }
          >
          > Currently, the reason I think that it might be an initialization error
          > of the ports is because in some examples that I have seen on the
          > example IAR code, I see a statement like "_disable_interrupt()", but I
          > have not been able to locate what this function does at the beginning
          > of the initialization. Also, I have read that there could be a
          > REQMASK that I might need to set.
          >
          > Best Regards,
          > Rudy
          >
          Thank You. I will look into all that you have mentioned, and if I
          still have problems, I will bring the actual code and not the cereal
          box... hehe.

          -Rudy
        Your message has been successfully submitted and would be delivered to recipients shortly.