Our firmware should trigger an interrupt every 50kHz and generate a low/high pulse at PF5. The source code for the timer interrupt looks like this:
result = adi_int_InstallHandler(ADI_SID_TIMER0, _TIMER0_INTERRUPT, 0, true);
*pSIC_IMASK |= IRQ_TIMER0;
*pTIMER_DISABLE = TIMDIS0;
*pTIMER0_PERIOD = 2400
*pTIMER0_WIDTH = 0;
*pTIMER0_CONFIG = PWM_OUT | PERIOD_CNT | IRQ_ENA;
*pTIMER_ENABLE = TIMEN0;
static void _TIMER0_INTERRUPT(uint32_t iid, void *pCBParam)
*pPORTFIO_CLEAR = PF5
*pTIMER_STATUS = TIMIL0;
*pPORTFIO_SET = PF5
The problem I have is that the timer interrupts with a delay, but only when the LwIP stack is used.If the stack is not used, the interrupt always strikes correctly.To illustrate this, I have attached 2 images of the LogicPort Analyzer:
ConvSt (Timer0) without LwIP Stack:
ConvSt (Timer0) with LwIP Stack:
I am using CrossCore Embedded Studio v.2.8.3 with the Lightweight TCP/IP (lwIP) Stack v.2.6.0.
I used the BF537 processor with CoreClock 600Mhz and SysClock 120Mhz on a own hardware board.
I have tried several LwIP configurations and changed the thread priorities of the LwIP stack. Unfortunately all without success.
Can you help me with this problem?
Hello,Can you please share us the project along with the steps to reproduce your issue here. This will help us to assist you better.Also if you have an EZ-KIT board, please try the same and let us know how you gets on. Regards,Santha kumari.K
I create a sample project for the EZ-KIT board and upload it.
i created and attached a sample project and tested it with the EZ-KIT board. The error still occurs.
The test program starts the timer0 and triggers an interrupt.
PF2 is toggled in the interrupt.
The Preprocessor definition "TEST_USE_LWIP" switches the LwIP on and off to test the 2 modifications.
With the LogicPort Analyser on PF2 I could see that with LwIP turned on the interrupt does not always strike at the same time.
When LwIP is switched off, the problem does not occur.
Timer0 interrupt without LwIP Stack:
Timer0 interrupt with LwIP Stack:
I hope the example helps to solve the problem.
Many thanks in advance.
No ideas yet?
We are working on this. We will get back to you soon