Post Go back to editing

Interrupt configuration fails.

Thread Summary

The user is experiencing issues measuring 1ms timer interrupts using the blackfin TMR timer in software, despite successful verification on an oscilloscope. The final answer suggests using a FreeRTOS software timer to set a boolean flag every 1ms and checking this flag in the GP timer callback function to verify the interrupt timing. The accompanying answer clarifies that a counter variable in the callback function can also be used to ensure the interrupt triggers 1000 times per second.
AI Generated Content
Category: Software
Product Number: ADSP-bf702
Software Version: cross core 2.12.1

Hi Team,

I'm current working on interrupt generation using blackfin TMR timer but while viewing in the scope, I was able to match setting what I'm configuring for example The code attached below is a 1 milliseconds once intrupt code where in scope for every 1 milliseconds, I'm able to see the high signal but while checking the intrupt call_back function I cannot measure it I want to know how to measure from the interrupt time verification like I did in scope, for refernce my PLL is 400MHZ and sys clock is 40MHZ. so please assest where my configuration fails. please give me assest as soon as possible.

3554.test_sema (2).zip

Regards,
Movas

Thread Notes

  • Hi Movas,

    Thank you for your inquiry.

    To verify timer interrupts, you can use a counter variable inside the timer callback function. If the timer is configured to trigger an interrupt every 1 ms, the counter should increment exactly 1000 times in one second. If this is not meeting your expectations, please clarify your requirements—specifically, how you intend to measure the timer behavior within the software callback.

    Waiting for your reply.

    Best Regards,
    Santhakumari.V

  • Hi Santhakumari,

    I understand the points you’ve raised regarding the verification process. However, measuring the interrupt for every 1ms has proven to be challenging. I have attempted to use the time.h clock module for this purpose, but it has not yielded the desired results.

    To clarify, from the board’s perspective, we are successfully able to verify the interrupt every 1 millisecond. However, we now need to confirm whether the configuration is correctly applied from the callback function side. The code you provided is intended for continuous PWM mode with periodic interrupts, but we require assistance in verifying the functionality from within the callback function.

    Could you kindly assist us in confirming the proper configuration on the callback function side as well?

    Regards,
    Movas

  • Hi Movas,

    Callback function is mainly used to notify the user that a process has completed, based on some interrupt.

    To verify the status of the GP timer in your software, you can use the software timer feature in FreeRTOS. Please refer to the attached file for more details. Here, the RTOS software timer is configured to invoke the handler function every 1ms, which sets a boolean flag to true. The GP timer callback function then checks this flag to verify the accuracy of the 1ms interval. However, apart from this check, only with inbuild software timing functions or cycle-based functions using inside the GP timer callback may not provide accurate timing measurements.

    Best Regards,
    Santhakumari.V

    timer_code.zip

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.