|
Помогите установить контакт по SPI с lpc2141, установление контакта по SPI с lpc2141 |
|
|
|
Mar 23 2010, 13:41
|
Группа: Участник
Сообщений: 7
Регистрация: 23-03-10
Пользователь №: 56 142

|
Уважакмые форумчане! Помогите! Не могу войти в контакт с LPC2141 по SPI! Все инструкции datasheet по установке SPI выполнил. Посылаю байт = "?" . Принимаю ответный байт и ожидаю получить что угодно, но не 00 или FF. а в результате ничего не получаю - почему? Что не так? Помогите!!!
|
|
|
|
|
 |
Ответов
|
Mar 24 2010, 08:54
|
Группа: Участник
Сообщений: 7
Регистрация: 23-03-10
Пользователь №: 56 142

|
Спасибо за Ваше участие! Предложенное описание ISP изучаю. Первое впечатление- оно соответствует описанному в datasheet: ISP описано в главе 21 Chapter 21: Flash Memory System and Programming -------------------------------------- 21.1 Flash Boot Loader The Boot Loader controls initial operation after reset, and also provides the means to accomplish programming of the Flash memory. This could be initial programming of a blank device, erasure and re-programming of a previously programmed device, or programming of the Flash memory by the application program in a running system. 21.2 Features • In-System Programming: In-System programming (ISP) is programming or reprogramming the on-chip flash memory, using the boot loader software and a serial port. This can be done when the part resides in the end-user board. • In Application Programming: In-Application (IAP) programming is performing erase and write operation on the on-chip flash memory, as directed by the end-user application code. 21.3 Applications The flash boot loader provides both In-System and In-Application programming interfaces for programming the on-chip flash memory. 21.4 Description The flash boot loader code is executed every time the part is powered on or reset. The loader can execute the ISP command handler or the user application code. A a LOW level after reset at the P0.14 pin is considered as an external hardware request to start the ISP command handler. Assuming that proper signal is present on X1 pin when the rising edge on RESET pin is generated, it may take up to 3 ms before P0.14 is sampled and the decision on whether to continue with user code or ISP handler is made. If P0.14 is sampled low and the watchdog overflow flag is set, the external hardware request to start the ISP command handler is ignored. If there is no request for the ISP command handler execution (P0.14 is sampled HIGH after reset), a search is made for a valid user program. If a valid user program is found then the execution control is transferred to it. If a valid user program is not found, the auto-baud routine is invoked. Pin P0.14 that is used as hardware request for ISP requires special attention. Since P0.14 is in high impedance mode after reset, it is important that the user provides external hardware (a pull-up resistor or other device) to put the pin in a defined state. Otherwise unintended entry into ISP mode may occur. И т.д. -------------------------------------------------------- Выполнил эти действия - нет ответа на запрос. Не могу понять в чем проблема (кроме той, что я чайничок)? С уважением barmich.
|
|
|
|
|
Mar 24 2010, 09:08
|

фанат дивана
     
Группа: Свой
Сообщений: 3 387
Регистрация: 9-08-07
Из: Уфа
Пользователь №: 29 684

|
Давайте всё по порядку. 1. Что у вас за плата. (отладочная готовая, своя); 2. Что куда цепляете (как соединён микроконтроллер с компьютером, как согласованы уровни); 3. Какой софт на компьютере. Пока хватит. И не стесняйтесь быть многословным, лучше дать лишнюю информацию, чем случайно умолчать о чём-либо важном. Цитата(zltigo @ Mar 24 2010, 14:04)  И не будет, поскольку ISP работает через UART0. Без вариантов. Вы первый на этом форуме, кому не удалось этого понять  Скорее человек просто перепутал слова ISP и SPI:)
--------------------
Если бы я знал, что такое электричество...
|
|
|
|
|
Mar 24 2010, 09:12
|

Гуру
     
Группа: Свой
Сообщений: 13 372
Регистрация: 27-11-04
Из: Riga, Latvia
Пользователь №: 1 244

|
Цитата(AHTOXA @ Mar 24 2010, 12:08)  Скорее человек просто перепутал слова ISP и SPI:) А это тогда он о чем???: Цитата 1. Должен ли Sel SPI устанавливаться в "1" при P0.14="0"? 2. Должен ли MOSI устанавливаться в "1" при Sel SPI ="0"?
--------------------
Feci, quod potui, faciant meliora potentes
|
|
|
|
Сообщений в этой теме
barmich Помогите установить контакт по SPI с lpc2141 Mar 23 2010, 13:41 DpInRock Вы не в состоянии пока формулировать вопросы. Mar 23 2010, 18:02 barmich Есть такой грех.
Попробую по-другому.
Для прошивки... Mar 23 2010, 20:07 DpInRock Перво наперво покажите место в даташите, в котором... Mar 23 2010, 20:57 rezident Может это не совсем то, но почитать следует Enteri... Mar 24 2010, 02:40 zltigo Цитата(barmich @ Mar 24 2010, 11:54) Выпо... Mar 24 2010, 09:04 barmich Благодарю за Ваше участие!
Извините за долгое ... Mar 24 2010, 19:26 AHTOXA Понятно, всё-таки пытались программировать через S... Mar 24 2010, 20:33 DpInRock Никогда так весело не смеялся.
Есть законы природы... Mar 24 2010, 20:33 rezident Цитата(DpInRock @ Mar 25 2010, 01:33) Ник... Mar 24 2010, 23:36 haker_fox Цитата(DpInRock @ Mar 25 2010, 04:33) Ник... Mar 25 2010, 00:05 barmich Уважаемые ФОРУМЧАНЕ! Спасибо! Буду пробова... Mar 25 2010, 09:20 DpInRock Ткнуть носом тяжело. Филипсовские даташиты славятс... Mar 25 2010, 10:17 zltigo Цитата(DpInRock @ Mar 25 2010, 13:17) Ткн... Mar 25 2010, 11:26 barmich Уважаемые ФОРУМЧАНЕ!
СПАСИБО!
Все получило... Apr 10 2010, 10:40
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
|
|
|