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

 
 
 
Reply to this topicStart new topic
> LPC11u24 reinvoke ISP, как реинвоукнуть ISP из кода
msp430starter
сообщение Dec 7 2012, 09:38
Сообщение #1





Группа: Новичок
Сообщений: 3
Регистрация: 13-10-11
Пользователь №: 67 711



Хочется вызвать бутлоадер из кода.

Собственно, есть код для LPC13xx

CODE
void ReinvokeISP(void)
{
IAP iap_entry = (IAP)0x1fff1ff1;
uint32_t command[5], result[4];
/* make sure 32-bit Timer 1 is turned on before
calling ISP */
LPC_SYSCON->SYSAHBCLKCTRL |= 0x00400;
/* make sure GPIO clock is turned on before calling ISP */
LPC_SYSCON->SYSAHBCLKCTRL |= 0x00040;
/* make sure IO configuration clock is turned
on before calling ISP */
LPC_SYSCON->SYSAHBCLKCTRL |= 0x10000;
/* make sure AHB clock divider is 1:1 */
LPC_SYSCON->SYSAHBCLKDIV = 1;
/* Send Reinvoke ISP command to ISP entry point*/
command[0] = 57;
/* Set stack pointer to ROM value (reset default).
This must be the last piece of code executed before
calling ISP, because most C expressions and function
returns will fail after the stack pointer is changed. */
__set_MSP(*((uint32_t *)0x1FFF0000)); /* inline asm */
/* Invoke ISP. We call "iap_entry" to invoke
ISP because the ISP entry is done through the same
command interface as IAP. */
iap_entry(command, result);
// Code will never return!
}


Этот код не работает на LPC11u24. В чем может быть проблема? Другие функции IAP выполняются корректно.

Сообщение отредактировал IgorKossak - Dec 7 2012, 11:58
Причина редактирования: [codebox] для длинного кода, [code] - для короткого!!!
Go to the top of the page
 
+Quote Post

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

 


RSS Текстовая версия Сейчас: 22nd July 2025 - 21:27
Рейтинг@Mail.ru


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