реклама на сайте
подробности

 
 
> Работа с AVR - CDC
Oleg_IT
сообщение May 24 2007, 07:29
Сообщение #1


Знающий
****

Группа: Свой
Сообщений: 922
Регистрация: 3-06-05
Из: Москва
Пользователь №: 5 709



Сделал связь AVR с PC через USB на libusb. Работает. Но для этого на РС нужно ставить драйвера, для заказчика это не удобно. Решил перейти на AVR – CDC. Взял проект AVR-CDC.2006-08-28 на ATtiny45. Не работает. Загружаю их прошивки cdctiny45.hex или cdctiny45r.hex, по осциллографу вижу, что какой-то обмен идёт, но РС пишет Unknown Device. Работаю в IAR проект для ATtiny45 не компилится из-за старой не решённой проблеме:
Error[e16]: Segment NEAR_Z (size: 0x8c align: 0) is too long for segment definition. At least 0x1 more bytes needed. The problem occurred while processing the
segment placement command "-Z(DATA)NEAR_I,NEAR_Z=_..X_SRAM_BASE-_..X_SRAM_END,_..X_EXT_SRAM_BASE:+_..X_EXT_SRAM_SIZE", where at the
moment of placement the available memory ranges were "DATA:d5-15f,DATA:15f--1"

Кто сделал такое устройство, помогите разобраться.
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
aleksey_g
сообщение May 24 2007, 16:35
Сообщение #2


Частый гость
**

Группа: Свой
Сообщений: 151
Регистрация: 11-01-06
Из: Украина Ровно
Пользователь №: 13 066



Цитата
usbdrv.h:
Hardware Prerequisites:
=======================
USB lines D+ and D- MUST be wired to the same I/O port. D+ must (also) be
connected to INT0. D- requires a pullup of 1.5k to +3.5V (and the device
must be powered at 3.5V) to identify as low-speed USB device. A pullup of
1M SHOULD be connected from D+ to +3.5V to prevent interference when no USB
master is connected. We use D+ as interrupt source and not D- because it
does not trigger on keep-alive and RESET states.

As a compile time option, the 1.5k pullup resistor on D- can be made
switchable to allow the device to disconnect at will. See the definition of
usbDeviceConnect() and usbDeviceDisconnect() further down in this file.
...
usbconfig.h:
/* ---------------------------- Hardware Config ---------------------------- */

#define USB_CFG_IOPORTNAME D
/* This is the port where the USB bus is connected. When you configure it to
* "B", the registers PORTB, PINB and DDRB will be used.
*/
#define USB_CFG_DMINUS_BIT 3
/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
* This may be any bit in the port.
*/
#define USB_CFG_DPLUS_BIT 2
/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
* This may be any bit in the port. Please note that D+ must also be connected
* to interrupt pin INT0!
*/


Обратите внимание на usbdrv.h и usbconfig.h
Возможно не правильно определены D+ D- и USB_CFG_IOPORTNAME
Отсюда может быть неопределенное устройство.
Вы используете те же линии, что и в примерах, которые прошивали?
Go to the top of the page
 
+Quote Post

Сообщений в этой теме
- Oleg_IT   Работа с AVR - CDC   May 24 2007, 07:29
- - Dog Pawlowa   Цитата(Oleg_IT @ May 24 2007, 10:29) Сдел...   May 24 2007, 07:40
|- - Oleg_IT   У меня CSTACK 0x10, RSTACK 8, меньше не могу, лезу...   May 24 2007, 07:55
|- - Dog Pawlowa   Цитата(Oleg_IT @ May 24 2007, 10:55) Сове...   May 24 2007, 08:13
- - GDI   ЦитатаError[e16]: Segment NEAR_Z (size: 0x8c align...   May 24 2007, 07:56
|- - KRS   Цитата(GDI @ May 24 2007, 11:56) Такая ош...   May 24 2007, 08:03
- - GDI   Необходимые размеры стека, да и адреса размещения ...   May 24 2007, 08:12
- - Oleg_IT   При ошибке линковщик мапа не делает, и посмотреть ...   May 24 2007, 08:16
|- - KRS   Цитата(Oleg_IT @ May 24 2007, 12:16) При ...   May 24 2007, 08:22
|- - Oleg_IT   Цитата(KRS @ May 24 2007, 12:22) Там же е...   May 24 2007, 10:20
- - GDI   Надо искать где определен этот сегмент NEAR_Z и ры...   May 24 2007, 08:34
- - GDI   Может при последующих включениях в другие порты? Я...   May 24 2007, 12:57
- - Oleg_IT   Один к одному собрал. И D- c D+ менял, не помогает...   May 25 2007, 04:50
- - GDI   Там еще есть режим отладки через уарт, но проблема...   May 25 2007, 10:27


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 19th July 2025 - 17:14
Рейтинг@Mail.ru


Страница сгенерированна за 0.01397 секунд с 7
ELECTRONIX ©2004-2016