Device Syncronization Error for Atmega32U4 ISP2SPI

Topics related to the Dataman 48Pro+
THP
Posts: 1
Joined: 29 Mar 2015 12:32

Device Syncronization Error for Atmega32U4 ISP2SPI

Postby THP » 29 Mar 2015 12:41

Hi, I am having "device synchronization error" with my Dataman pro48+. I am using Atmega32U4 and I have attached an external crystal oscillator of 7.3728MHz. I have checked my PCB and headers. I am using ISP programming and using SPI (MOSI MISO) pins of controller. I even updated my Dataman Software to the latest available version but I cannot work around this error. The board is powered from external source, so I am using the first pin of ISP connector to sense the voltage, and there is no error in that (its 5000mv).

Please help.

Dataman (Neil Parker)
Posts: 931
Joined: 10 Nov 2011 09:51

Re: Device Syncronization Error for Atmega32U4 ISP2SPI

Postby Dataman (Neil Parker) » 30 Mar 2015 08:26

Hello THP,

Have you read all the information we provide in our software about working with this device using ISP-SPI:

General Info:
Flash array is located in buffer from 0H to 7FFFH.
EEPROM array is located in buffer from 8000H to 83FFH.
Device contains preprogrammed (by manufacturer) calibration values for all four internal RC oscillators. If you want to use one of this internal oscillators, you have to write this calibration value into selected oscillator in one of first instructions of code to keep as precise timing of the chip as possible. To be this calibration values useable, you must to copy the preprogrammed value of the selected oscillator in to any place of Flash or EEPROM memory and the use it as parameter of appropriate instruction. Calibration value address in device buffer is byte oriented.

Before starts any action with device (in target system) make sure, that Oscillator frequency and Supply voltage in target system are set (menu Device/Device options/Operation options or press <Alt+O>).

As Application Note AVR:910 describes,the reading of FF device ID value does not indicate device failure. In this case an ID check has to be disabled. Erase operation don't touch the fuse bits according Atmel's recommendations.
If you want to program the calibration byte, you have to choose an address of a blank data memory space. Otherwise the calibration byte will not be programmed and the programming procedure won't even start. In that case, choose a different destination address for the calibration byte and run the programming procedure again. Ensure, that the calibration address points to a blank memory space.

Based on the errata sheet from Atmel to this chip (quoted): Internal RC oscillator start up issue. When the part is configured to start on internal RC, the oscillator may not start properly after power-on. Problem Fix/work around Do not configure the part to start with the internal oscillator (default part configuration is to start with the external crystal oscillator). The bug will be fixed in the RevB. The Internal RC oscillator option can be set only after operator authorization.

Correct settings of CPU clock frequency
It is very important to set the correct CPU clock frequency, because the maximum communication speed is 1/4 of actual frequency of CPU clock. Therefore it is important to realize, that you have to set the current value of the CPU clock frequency in "Device operation options" window, not the frequency, that will be actual after programming. Setting too high frequency of CPU clock results into a device synchronization error.

How to find an actual frequency of CPU clock
Before you start looking for the actual frequency of CPU clock, verify the correctness of your ISP connector connections and verify if you've fulfilled the needed minimal isolation of the communication pins from another system according to the programmer needs. If this conditions aren't fulfilled, looking for the actual frequency of CPU clock is pointless, because the device won't communicate.

If you've got a new device, it should be programmed to the default fuse settings. This settings is described in the fuse bits section of the corresponding datasheet. This settings often selects the internal oscillator as CPU clock source. This means, that if you have any oscillator or crystal connected to the chip, it is ignored until you change the clock settings in fuse bits. Mostly the default frequency of the CPU clock is 1Mhz.

If your device is not new, there is no way to find out your actual clock settings. Simply try some lower frequency(1MHz, 500KHz, 100Khz) and read the device. If you can't get it working and you're using crystal oscillator, verify the clock on XTAL1 pin. If the clock is not present, you have to get clock from the device allowed spectrum from any clock source to this pin. After you do this and your device is still not communicating, that means, that the SPIEN fuse bit is unprogrammed and the SPI interface is disabled.


If you believe that the issue is not addressed here then please recreate the error as you have described, this will record it in the activity log. If you can then run the "selftest" and "selftest of ISP connector" from the Programmer menu, if you have the ISP diagnostic module as well as the 48 pin one. Then use the "Help | Create problem report" feature in our software to generate an error report. Please email this report to [email protected] for analysis.

If you have any questions, please contact me.

Best regards,

Neil Parker
Dataman programmers


Return to “Dataman 48Pro+”

Who is online

Users browsing this forum: No registered users and 7 guests