A problem about isp for xmega128a1u ,#2

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear moderators:

 

           I don't know if I should start a new topic about ISP.  if it is not proper . you can del the topic.

 

          My bootloader work well when I use atmel-ice, the Led flash about 0.2s,and send a char(0x38) to PC(for debug).

          But when the app jump to bootloader (by jump 0x20000),the Led flash about 32~35s, and send a char(0x38) to PC.

          The app and bootloader both use internal 32M osc.

          Beacause the bootlaoder can send char to PC, only very slow,and I mask other code for debug. I think the clock(OSC) is Ok.

          But where is the problem?

 

 

APP CODE:

 

    if(EnterISP==true)
    {
      cli();
      asm ("jmp 0x20000");
    }

 

 

bootloader code:

 

 

      for(;;)
      {
     
        Cycle++;
        if((Cycle%10000)==0)
        {
          WorkLedFlash();
          LedFlash();
          sendchar('8');
        }
         //-----------------------------------------------------------
         //数据接收解析
         
         //GetSerialData();
         //CmdProcess();
         //-----------------------------------------------------------

        //-----------------------------------------------------------
     

      } // end: for(;;)

 

 

 

 

Attachment(s): 

Last Edited: Sun. Apr 10, 2022 - 01:36 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are confusing terms. A bootloader uses SPM. ISP refers to a system (often like SPI) that is used to program an AVR using an external interface. I would not use the term ISP in relation to a bootloader. It is VERY confusing.