PlatformIO Community

Arduino Due ( RamFunc ) ISR

Hi,
Projects with PIO Arduino Due ( execute code in RAM).

my test: compiling led blink, loader in RAM
reloked VTOR…
jmp code = ok.

problems is: ISR in libray… error
//--------------------------------------------------
test1: Serial library… failure ISR.
solution: creat function serial.
see:
_MYREG->RAM_VECTOR[24] = (uint32_t)tablefunc[2]; // Serial

IRQn_Type _dwId = UART_IRQn; add it

pmc_enable_periph_clk( _dwId ) ;
blablabla…
NVIC_EnableIRQ(_dwId); goto! ok
//------------------------------------------

now:
Due_CAN
erro init CAN0.
_MYREG->RAM_VECTOR[59] = (uint32_t)tablefunc[4]; // (uint32_t)(&CAN0_Handler), //4

         Can0.begin(CAN_BPS_500K);  error !
         Can0.watchFor();  

problems is ISR.

thanks,
Carlos.

Hi,
The problem happens on this line, in " due_can.cpp"

m_pCan->CAN_MR &= ~CAN_MR_CANEN; //immediately disable the CAN hardware if it had previously been enabled

reset_handler,

thanks,
Carlos.