4 Replies Latest reply on Apr 23, 2019 5:24 PM by XiaoweiZ_71

    Acquire PSoC6 MCU  failed

    yiru_1705901
      hello all ,

      I write the programmer code for  posc6 on stm32 chip according to the following instructions.

      https://www.cypress.com/documentation/programming-specifications/psoc-6-programming-specifications?source=search&keyword…

      But there is a fail in the  Step 1.A – Acquire PSoC 6 MCU, pcVal  is out of range ,it is always fail.

       

      if (((pcVal >= MEM_BASE_ROM) && (pcVal < (MEM_BASE_ROM + MEM_SIZE_ROM)))  || ((pcVal >= MEM_BASE_SFLASH) && (pcVal < (MEM_BASE_SFLASH + MEM_SIZE_SFLASH))))

           {

         bSwdAcquired=TRUE;

         }

        else

        {

         bSwdAcquired=FALSE;

        } 

      Can someone help me?

       

        

       

       

        • 1. Re: Acquire PSoC6 MCU  failed
          XiaoweiZ_71

          Each subroutine provided in the spec supports return value, you can use this feature to check out from which line CPU start to get error return value.

          • 2. Re: Acquire PSoC6 MCU  failed
            yiru_1705901

            I checked again, it is all right before the "ReadIO  (0xE000EDF8, OUT pcVal);   after this operation, the out put value pcVal is out of range

             

            // Check PC – in Test Mode, it must point to address in ROM or in SFLASH

            WriteIO (0xE000EDF4, 0x0000000F);

            ReadIO  (0xE000EDF8, OUT pcVal);

            if (((pcVal >= MEM_BASE_ROM) && (pcVal < (MEM_BASE_ROM + MEM_SIZE_ROM)))   || ((pcVal >= MEM_BASE_SFLASH) && (pcVal < (MEM_BASE_SFLASH + MEM_SIZE_SFLASH))))  

            return PASS

            else return FAIL

            • 3. Re: Acquire PSoC6 MCU  failed
              yiru_1705901

              the out put value pcVal =0x0800172A,it is effective value , I can't understand why is it out of range

                

               

               

              Effective value

               

              • 4. Re: Acquire PSoC6 MCU  failed
                XiaoweiZ_71

                #define MEM_BASE_ROM           0x00000000 // Base address of System ROM

                #define MEM_SIZE_ROM            0x00020000 // Size of System ROM

                 

                #define MEM_BASE_SFLASH      0x16000000 // Base address of Supervisory Flash region

                #define MEM_SIZE_SFLASH       0x00008000 // Size of Supervisory Flash region

                 

                If (((pcVal >= MEM_BASE_ROM) && (pcVal < (MEM_BASE_ROM + MEM_SIZE_ROM)))

                || ((pcVal >= MEM_BASE_SFLASH) && (pcVal < (MEM_BASE_SFLASH + MEM_SIZE_SFLASH))))

                 

                pcVal =0x0800172A is not a valid value.

                1 of 1 people found this helpful