попытка перенести работу с прерываниями в hal. зависаем где-то, не доходя до trap_handler(), хотя по map файлу все логично

This commit is contained in:
klassents committed 2024-09-25 16:46:57 +07:00
1 parent 562c29dbe1
commit 85d81a54b1
6 files changed
+49 -23

No files matched your search

+6
View File
@@ -1,11 +1,15 @@
#include "board.h"
#include "mik32_hal_pcc.h"
#include "mik32_hal_irq.h"
#include "Arduino.h"
// --------------------- init --------------------- //
// called before setup()
void pre_init(void)
{
// set irq vector to ram region
write_csr(mtvec, 0x020000c0);
HAL_Init();
// gpio clock
@@ -23,6 +27,8 @@ void post_init(void)
{
// enable global interrupts by default
interrupts();
((GPIO_0)->SET = (GPIO_PIN_0));
}
// --------------------- other --------------------- //