на самом деле код работает, дело было в бутлоадере. все связанное с прерываниями теперь в рам

This commit is contained in:
klassents committed 2024-09-26 11:24:08 +07:00
1 parent 85d81a54b1
commit d228bc7ff9
1 file changed
+3 -1
+3 -1
View File
@@ -8,7 +8,7 @@
void pre_init(void)
{
// set irq vector to ram region
write_csr(mtvec, 0x020000c0);
write_csr(mtvec, 0x02000000);
HAL_Init();
@@ -35,8 +35,10 @@ void post_init(void)
// print text if Serial is enabled
extern "C" void ErrorMsgHandler(const char * msg)
{
#ifdef HardwareSerial_h
if(Serial)
Serial.println(msg);
#endif
}