Issue of slow execution of commands with atprogram

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

Hi Atmel forum,

 

I use an AtmelIce device with Atprogram.exe to program ATSAMD21E18A. When I program a new blank chip, I have no problem. However, at the moment the chip is programmed, all the commands following the programming become slow to execute, takes about a minute and half.

 

here's an example of my code

 

atprogram -t atmelice -i SWD -d ATSAMD21E18A -cl 2MHz chiperase                    //speed of the execution command speed is right

atprogram -t atmelice -i SWD -d ATSAMD21E18A -cl 2MHz program -f FILE_PATH  //speed of the execution command speed is right

atprogram -t atmelice -i SWD -d ATSAMD21E18A -cl 2MHz verify -f FILE_PATH     //speed of the execution command speed becomes slow

atprogram -t atmelice -i SWD -d ATSAMD21E18A -cl 2MHz secure                       //speed of the execution command speed is slow

 

Notice, I don't have this problem when I use Atmel Studio 7 with the same program and the same clock speed.

 

I use an ELF file but I have the same problem with the BIN file. 

 

I activated the logs to see the different between the chiperase command with a blank chip and a chip already programmed. It seems to have a problem with the mplab communication library. See the screenshot below and the highlighted time for both tests.

 

Do you have a way to solve this delay of 1 minute and half?

 

 

David

 

This topic has a solution.
Last Edited: Wed. Jul 6, 2022 - 03:41 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I found my problem. The programmed chip is used to manage a special usb keyboard. When I program the chip I use the voltage from a usb port of PC to supply the board. As soon as the chip is programmed,  Windows detects automatically a new keyboard in the device manager and it's from the time that each next command becomes slow. With the atprogram, With the atprogram program, mlabcomm seems to conflict with the Windows driver.

 

So the solution, I modified the usb cable by cutting the data input and data output wires for the programming step.

 

David