6 Replies Latest reply on Oct 6, 2016 12:49 PM by rm3330_1699156

    CY Boot Infinite Loop Problem

    rm3330_1699156

      Hello I am trying to execute the following code: 

         

      int main()
      {

         

          /* Initialize ADC. Conversion is not enabled yet. */
          //void ADC_Start();
          CyGlobalIntEnable;
         ADC_Start();
         ADC_IRQ_Enable();
         ADC_StartConvert();

         

          /* Start ADC conversion. */
        for(;;)
      {
      while(row_count<2u)
      {
             CySysFlashWriteRow(row_count,Buffer);
        
      }      

         

              for(k=1u;k<2u;k++)
              {
              *readptr = CY_FLASH_BASE + (k*CY_FLASH_SIZEOF_ROW);
              for(byte_count=0u;byte_count< CY_FLASH_SIZEOF_ROW;byte_count++)
                {
                read_data[byte_count] = (*(uint8 *)(readptr + byte_count));
                //byte_count++;
                }
            //  k++;
              }

         

      }
      }  
                

         

      However, after writing and entering the     for(k=1u;k<2u;k++) loop it enters into this while loop which I found from debugging: 

         

       #ifdef CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK
              CyBoot_IntDefaultHandler_Exception_EntryCallback();
          #endif /* CY_BOOT_INT_DEFAULT_HANDLER_EXCEPTION_ENTRY_CALLBACK */

         

          while(1)
          {

         

          }

         

      Any ideas as to what the problem might be?