I have tested the peripheral example and the proximity example and both of them are up and running after some struggels.
的peripheral example contains the main function so the main() in ROM code is not called. The proximity example uses the main_func so the main() in ROM is called. How does this work? I see different SystemInit functions but I explain the startup behavior of both examples.
Proximity Initvoid SystemInit (void)
{
SystemCoreClock = __SYSTEM_CLOCK;
SetBits32(GP_CONTROL_REG, EM_MAP, 23);
memset((void*)0x80000,0,0x3000);
__enable_irq();
}
Peripheral example initvoid SystemInit (void)
{
SystemCoreClock = XTAL;
return;
}
For both I am using the sysram.ini only in the proximity the global interrupts are enabled. But the peripheral example uses alse interrupts so there it must be enabled to?
Could you explain what I am missing? Thanks in advance!
Hi Wouter,
In the peripheral example the interrupts are enabled in the individual cases:
See for example timer.c line 30:
NVIC_EnableIRQ(SWTIM_IRQn); // enable interrupt
Hope this explains.
Regards,
Dialog Support Team