Compare commits

..

4 Commits

Author SHA1 Message Date
Ogneyar
6b87753674 added a feature common to all interrupts 2024-12-04 09:52:06 +03:00
979a5ea9ae fix for flashing on linux 2024-11-02 14:59:01 +07:00
2e8482323c Обновить README.md 2024-11-01 05:11:52 +03:00
766b7b32ea Обновление до версии 0.3.0
- обновлен elbear_fw_bootloader - добавлена проверка контрольной суммы каждой строки hex файла.
- в модуль работы с АЦП добавлена функция analogReadResolution(). Функция analogRead() теперь возвращает усредненное по 10 измерениям значение.
- общая функция обработки прерываний перенесена в память RAM. Обработчики прерываний модулей External Interrupts и Advanced I/O (функция tone()) так же перенесены в память RAM для увеличения скорости выполнения кода.
- в пакет добавлены библиотеки EEPROM, Servo, SoftSerial, NeoPixel, MFRC522 адаптированные для работы с платой Elbear Ace-Uno.
- добавлено описание особенностей работы с пакетом
2024-10-17 08:27:39 +03:00
3 changed files with 29 additions and 6 deletions

View File

@ -56,7 +56,7 @@ void HardwareSerial::begin(unsigned long baud, uint8_t config)
// leaving the data length selected as 8 bits
// stop bit // stop bit = 1 - everything is zero, don't set anything
if (((config >> 3) & 0x01) == 1) // stop bit = 2
if ((config >> 3) & (0x01 == 1)) // stop bit = 2
reg2config |= UART_CONTROL2_STOP_1_M;
// turn on the receiver and transmitter, apply the parsed config

View File

@ -11,12 +11,34 @@ void __attribute__((weak)) wire_interrupt_handler(void)
}
void __attribute__((weak)) servo_interrupt_handler(void)
{
// dummy function for case when wire library is not in use
// dummy function for case when servo library is not in use
}
void __attribute__((weak)) ISR(void)
{
/* A dummy function for the case when additional interrupts are not used in the project.
In the project, you need to create a function of the form:
extern "C" void ISR(void)
{
// timer16 is taken as an example
if (TIM16_GET_ARRM_INT_STATUS(htimer16_1_))
{
// necessary actions
}
// reset timer interrupt flags
TIM16_CLEAR_INT_MASK(htimer16_1_, 0xFFFFFFFF);
}
before that, be sure to connect the libraries:
#include "mik32_hal_timer16.h"
#include "mik32_hal_irq.h"
#include "wiring_LL.h" */
}
// ---------------------------------------------- //
void __attribute__((noinline, section(".ram_text"), optimize("O3"))) trap_handler (void)
{
// all interrupts
ISR();
// gpio interrupt
if (EPIC_CHECK_GPIO_IRQ())
gpio_interrupt_handler();

View File

@ -87,3 +87,4 @@ tools.mik32_upload.bootloader.params.quiet=
# For Sketch > Upload Using Programmer
tools.mik32_upload.program.pattern={path}/{cmd} {build.path}/{build.project_name}.hex --run-openocd --openocd-exec={runtime.tools.openocd.path}/bin/openocd{cmd.extension} --openocd-interface={path}/openocd-scripts/interface/ftdi/mikron-link.cfg --openocd-target={path}/openocd-scripts/target/mik32.cfg
tools.mik32_upload.program.params.quiet=