If using JN516x and ZigBee3.0 stack JN-SW-4170 is it possible to also use interrupt functions from the JN516x Integrated Peripherals API? Such as...
u32AHI_Init
vAHI_SysCtrlRegisterCallback
vAHI_Uart1RegisterCallback
I need to access the brownout, input, uart, pulse counter and analogue callback functions and using the above functions allows for more autonomous interrupt handling (interrupts are cleared and parsed automatically, I realize uarts are not cleared automatically but they are parsed automatically)
If these functions are no longer available because of the free_rtos interrupt handling, is there any documentation on modifying the irq_JN516x.S file? I have successfully added the System controller interrupt I needed but only by looking at all the examples and guessing at the structure. Then I have to poll all of the conditions that could have triggered it. I would l0ve to be able to recreate the original mechanism of the registered callback functions.
I had to post this one sentence at a time to figure out that the word "l0ve" is banned! Really?!?!
Are you registering your callbacks before "TARGET_INITIALISE()"?
Are your callbacks listed in irq_JN516x.S?
Sorry, I forgot to mention I am using the JN-AN-1229.
My problem is the lack of mention of interrupt handling in the stack user guide. Whereas when using JN-AN-1184, the documentation specifically mentions the application of u32AHI_Init when using JenOS. As you can see, u32AHI_Init is not called for the JN516x when using ZigBee 3.0. The TARGET_INITIALISE() function is, to my untrained eyes, what appears to be a lot of vector macros which I do not understand. Hence the request for documentation on irq_JN516x.S.
Are you using the irq_JN516x.S file?
If not, what does the code below look like for you?
PUBLIC void APP_vSetUpHardware(void)
{
#if (JENNIC_CHIP_FAMILY == JN517x)
u32AHI_Init();
vAHI_InterruptSetPriority(MICRO_ISR_MASK_BBC, NVIC_INT_PRIO_LEVEL_BBC );
#else
TARGET_INITIALISE();
/* clear interrupt priority level */
SET_IPL(0);
portENABLE_INTERRUPTS();
// vAHI_BrownOutConfigure(E_AHI_VBOREF_3V0, FALSE, TRUE, FALSE, TRUE);
// vAHI_SysCtrlRegisterCallback( APP_isrSysCon );
// vAHI_InterruptSetPriority( MICRO_ISR_MASK_SYSCTRL, 4);
// u32AHI_Init();
#endif
epbelan
I am using AN1229 too
I am guessing "TARGET_INITIALISE();" function includes calling u32AHI_Init(); or it's an alternative function to it.
So you shouldn't call u32AHI_Init() again before using any function from Integrated peripheral API
You'll find Interrupt handling functions in Integrated peripheral API guide according to the peripheral you're using
I already used PWM , ADC , I/O and other peripherals successfully
epbelan
I am using many functions of Integrated Peripherals API ,So yes I believe it's possible
It's more of a general API that can work with all stacks unless something else is mentioned in a particular part in the stack user guide.
If you're using an application note you'll notice that "u32AHI_Init" maybe is already called so make sure you don't call it twice.
I hope this helps
Regards