Anyone worked with making own ISR or callback functions in S7G2 . I figure out callback functions are registered in bsp_group_irq but not sure how it works or maybe anyone have some reference for it.
Here is an example on how to write a user defined ISR in SSP 1.x.x. For version 1.2.0 and later read replies further down in this post...
The example enables the GPT0 Capture Compare A Interrupt
I've used a similar process for additional ADC interrupts, so I think what is written below is correct!
Enable the interrupt in the ICU tab of the Synergy Configurator.
Generate & Build the project.
If you were to run the project, as part of SystemInit (), there is a function call to bsp_irq_cfg ();
void SystemInit (void)
/* Initialize ELC events that will be used to trigger NVIC interrupts. */
This populates the Interrupt Enable Select Registers in the ICU.
This can be seen the IO Register ICU -> IELSR debug view
We now have to write the ISR.
In the source file, for example hal_entry.c, write the following:
To enable the interrupt, the interrupt has to be enable in the NVIC.
In source file, for example hal_entry.c, write the following:
In the ISR it will most likely to clear the interrupt flags that have been set in the IELSR and potentially, the peripheral.
In this example of the GPT, the code would be:
Thanks alot Richard Warner i will try and let you know if having some problems