2 Replies Latest reply on May 14, 2018 6:27 AM by 學人楊

    FX3 firmware file cyfxtx.c  : bits beyond valid memory

    學人楊

      Hello, I want to know the bit ordering of FX3

       

      ======================================================

      Update : Sorry,  I mean CyU3PDmaBufferInit  actually, not CyU3PDmaBufferDeInit.

      ======================================================

      at  the function   CyU3PDmaBufferInit the source file   cyfxtx.c,

       

      there is a comment  says

      "make those bits beyond valid memory range as unavailable."

       

      ========================================================

      For example :

       

       

      If I set my heap size to  2292 byte , then

       

         2292/32 =71 bit , 71 status bits are required , and also

               71 mod 32 = 7 .

      7 bits are in     glBufferManager.usedStatus[size - 1]

       

      and there is a local variable

           temp = 32 -7 = 25,

       

      so i have 25 bits beyond valid memory range.

       

      and finally the masking

      glBufferManager.usedStatus[size - 1]       = ~((1 << 25) - 1)

       

        then i set the highest  7 bits of

      glBufferManager.usedStatus[size - 1]   to 1.

       

      ========================================================

      please correct me if I'm wrong.

       

      訊息由此人編輯:學人 楊