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

 
 
> stm32f051 remap
-SANYCH-
сообщение Mar 20 2013, 09:27
Сообщение #1


Местный
***

Группа: Свой
Сообщений: 289
Регистрация: 6-12-05
Пользователь №: 11 864



Собственно задача: есть программа загрузчик которая должна грузить во флеш основную программу. Как я правельно понимаю что бы работала основная программа нужно скопировать таблицу векторов и сделать ремап. Как это правельно сделать в IAR (использую 6.50.3)? Может где нить есть пример как это делать?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
-SANYCH-
сообщение Mar 25 2013, 07:52
Сообщение #2


Местный
***

Группа: Свой
Сообщений: 289
Регистрация: 6-12-05
Пользователь №: 11 864



Цитата
stm32f0 вроде не Cortex-M0+. Так что NVIC_SetVectorTable не годится.


Цитата
To build such application, some special configuration has to be performed:
1. Set the application load address at 0x08003000, using your toolchain linker file
2. To be able to serve the application interrupts, you need to relocate the vector
table (which contains the interrupt handlers). However, unlike CortexM3 and CortexM4,
the CortexM0 processor do not support vector table relocation (it is fixed at
address 0x00000000).
A solution will be to relocate by software the vector table to the internal SRAM:
- Copy the vector table from the Flash (mapped at the base of the application load
address 0x08003000) to the base address of the SRAM at 0x20000000.
- Remap SRAM at address 0x00000000, using SYSCFG_MemoryRemapConfig() function
- Then once an interrupt occurs, the CortexM0 processor will fetch the interrupt
handler start address from the relocated vector table in SRAM, then it will
jump to execute the interrupt handler located in the Flash.
This operation should be done at the initialization phase of the application.


Разобрался с этим вопросом. На сайте ST нашел вот такой архив "stm32f0_programming_usart.zip". Там все очень хорошо описано.
Всем спасибо!


Прикрепленные файлы
Прикрепленный файл  stm32f0_programming_usart.zip ( 1.58 мегабайт ) Кол-во скачиваний: 130
 
Go to the top of the page
 
+Quote Post



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

 


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


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