Arduino core Source files for Configuration Mods

I need to modify the Arduino core configuration file/s for using certain peripherals for my application,but, to let the Arduino core scheduling functions intact.

Any help on this modification is appreciated and also the location of the files in the installation directory.

More specifically i need to modify that part of the core startup code where the peripherals are initialized!! i found that init() and initvariant() functions are my target, which source file has these function related code?

This is specifically for the nano every board using the ATMega4809uC

on Linux
/home/juraj/.arduino15/packages/arduino/hardware/megaavr/1.8.8/cores/arduino

or on web

Character case is important.

init() for the Nano Every.

initVariant() for the Nano Every.

Thanks Juraj...i have this library installed, i just need to know which timer i can use in the 4809, w/o affecting all the arduino core scheduling, timing functions, loop function, etc .

there are 4 timers TCB0, TCB1, TCB2, TCB3 ----which timers can i use w/o affecting all the arduino core timing functions? the moment i use TCB0, TCB1, the core crashes...

thanks for the hint

Why? The chip doesn't have any protection, so you're free to completely re-initialize anything that the core may already have set up. (I guess you do need to check that nothing important NEEDS that initialization. But in general, avoid modifying the core...)
Exception: if AVR top-level ISRs are defined, they can't be re-defined in user code.

The source may be easier to browse online: ArduinoCore-megaavr/cores/arduino/wiring.c at master · arduino/ArduinoCore-megaavr · GitHub
Sometimes there are nice code-browsing tools available (Hmm. But I don't see them in the Arduino core...)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.