Archive for the ‘AVReAl’ Category.

AVReAl update — 1.28r11

avreal v1.28r11 (Sat 2012-06-23) has been released.

  • AT90pwm161, ATtiny1634 added
  • -a switch without arguments now generates an error message instead of usage of default FBPRG adapter

AVReAl update — 1.28r10

avreal v1.28r10 (Sun 2012-04-29) has been released.

  • Error in EEPROM size for ATmega328, ATmega328P — fixed.
  • Alias for ATtiny84A added.

AVReAl/Linux and root privileges

Originally AVReAl/Linux worked with LPT directly, by processor in/out instructions. This method requires root privileges. Later /dev/parport support was added. It is enough to add a user in lp group for this access method. Both ways are described in AVReAl and LPT in Linux post.

Then FTDI MPSSE support was added. I noticed that without administrator rights the program can’t connect to FT2232 chip. But all AVReAl versions on my PC run with root priveleges because it is required for LPT direct acces testing. So, the program works fine with FTDI chips and I had no need to dig deeper.

Finally I decided to investigate the matter. As often happens, to do right you just stop and spend a little time to read and think.

To work with FTDI-based programmers without root priveleges add a file named, for example 55-ftdi.rules to directory /etc/udev/rules.d/. The file must have the following content:

# FTDI-based devices
#
# FTDI vid=0403
# FT2232, FT2232H: pid=6010
# FT4232H:  pid=6011
# FT232H:   pid=6014
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010|6011|6014", OWNER="root", GROUP="root", MODE="0666"

You need not reboot. It is enough to reconnet the programming adapter.

The rules use default vid/pid for FTDI chips. If you use an adapter with different vid/pid, add appropriate line into the file.

OpenOCD contains a file with rules for all adapters supported by this program. If FTDI-based adapter listed in the file is used with AVReAl, you can simply copy the file into /etc/udev/rules.d/ directory. OpenOCD rules use GROUP="plugdev", MODE="0664". As for me it is no difference between this two variants for desktop PC because all users are already included in plugdev group.

Of course, you must have administrator rights to create the file. After that you will be able to work with AVReAl without root privileges.

Attached Files:

FT2232C, FT2232L, FT2232D

Час від часу зустрічаю запитання по відмінностях між цими мікросхемами. В описах чи відкритих проектах в інтернеті згадується FT2232C, а в продажу зараз є FT2232D. Виникають сумніви у сумісності програм та адаптерів.
Як це часто буває, всі ці сумніви розвіюються при перегляді сторінки опису FT2232D. Але чомусь багатьом легше не подивитися на сайті виробника, а спитати на форумі чи набрати рядок «різниця FT2232C та FT2232D» в пошуковику. Ну що ж, ось він, цей рядок для нього, хай йому буде легше 🙂

Документації на старіші версії мікросхем на сайті вже немає, але безпосередньо на сторінці сказано:

The FT2232D is the 3rd generation of FTDI’s popular USB UART/FIFO IC. The FT2232D is an updated version of the FT2232C and its lead free version, the FT2232L. Please note that the FT2232D is not an new generation of device.

The FT2232D is lead free and pin compatible with the original FT2232C and FT2232L devices. All the original device features are supported with some additional features available including a CPU-style FIFO mode and an extended operating temperature range.

І що ж все це означає? » » »

AVReAl and MPSSE

Some of FTDI USB converter chips have MPSSE — hardware engine for implementation of serial interfaces like JTAG, SPI, I2C. FT2232D and previous versions FT2232C, FT2232L support Full-Bandwidth USB and have upper TCK/SCK frequency level 6 MHz. FT2232H, FT4232H, FT232H work in USB 2.0 Hi-Speed mode and have 30 MHz limit.

MPSSE defines DBUS0..DBUS2 as TCK/SCK, TDI/MOSI and TDO/MISO. AVR ISP interface requires RESET signal. DBUS3 (TMS/CS) can be used for this purpose and AVReAl uses it by default.

Read more about MPSSE and AVReAl » » »

AVReAl update — 1.28r9

avreal v1.28r9 (Tue 2011-12-20) has been released.

  • FT232H MPSSE mode support added.
  • Delays processing in Windows version changed: lower CPU load for -k/-K switches.
  • Resynchronisation method changed for all microcontrollers.
    Resync process started with one attempt of RESET pulse method then continued with SCK pulse method.
    More about synchronisation.

ISP-programmer to AVR synchronisation

AVR ISP-programming starts with RESET activation following by transmitting of programming enable instruction. Entry sequence requirement is that SCK must be set to ‘0’ during RESET activation. Otherwise SCK falling edge causes unintended programming hardware state change.

AVR programming waveforms

The falling edge distorts 4-byte programming instruction. The microcontroller does not recognise it and does not enter programming mode. There is no sense to send programming entry instruction again because byte-level command’s phase is shifted by one SCK period. The last SCK pulse of previous instruction will act as extra pulse for subsequent command.

Synchronisation can also be corrupted during programming process. Read more in publication about AVReAl “synchronisation lost” message.

Atmel datasheets describe two methods for synchronisation recovery.

»»» Read more about resynchronisation[/lаng_en]

AVReAl beta — 1.28r9b1

avreal beta-version 1.28r9b1 with FT232H support has been released.
Please, test it.


Update: testing done, thanks.

AVReAl 1.28r8 / FreeBSD

avreal v.1.28r8 and older ones were built for FreeBSD 6.4.
avreal1.28r8 was rebuilt for FreeBSD 8.2 then tested and uploaded to avreal download page.

All future versions will be built for FreeBSD 8.2 only.

AVReAl update — 1.28r8

avreal v1.28r8 (Sat 2011-08-13) has been released.

  • Raw binary file support is added.
    Binary files are denoted by :bin: prefix in file name.
  • -r switch behavior is changed.
    -r+ forces writing full memory content into output file (“old” behavior of -r).
    When -r is used, rows which contain only FF bytes in data field will not be written into :ihex: output file. FF-only tail will not be written into :bin: file.
[flagcounter image]