ΣSigmaStudio Ask AI Русский Log in

BF607 Interrupt programming

Processors & DSP Prakash Apr 27, 2020 00:00 6 replies Original on forum ↗
Subscribe
Prakash Question
Apr 27, 2020 00:00

Hi,

Currently I am porting my code from BF523 to BF607. Our old code was developed in VisualDSP and now I am using CCES. I am completely new to AD processors.

With regards to interrupts, I have following questions:

1) How to use IVG14 for scheduler interrupt, please provide code example.

2) How can we differentiate between two GPIO line interrupts from same port? Do we need to have a common ISR? please provide code example.

3) I was looking for examples for declaring an ISR as reentrant but couldn't find any. There is interrupt_reentrant pragma mentioned in HRM but an example usage would help.

4) for cli() and sti() substitute, do we need to use global and core interrupt enable/disable statements?

Thanks,

Prakash

ADIApproved Reply
Apr 30, 2020 00:00

Hi,

Please download BSP(Board support package) for ADSP-BF60x in the given below link.
download.analog.com/.../ADI_ADSP-BF609_Evaluation_Board-Rel1.1.0.exe

After installing BSP, you can found the example codes in the below installation path of ADSP-BF60x board support package,
<Installation directory(CCES)> ADSP-BF609_Evaluation_Board-Rel1.1.0\BF609_EZ-Board\Blackfin\Examples

ez.analog.com/.../faq-what-are-board-support-packages-and-do-i-need-one

The ADSP-BF60x Blackfin processors have a number of interrupt channels dedicated to pin interrupts. These channels are managed by a set of hardware
blocks named PINTx. Every PINTx block can sense upto 32 GPIO pins. Please refer "PORT Event Control" in BF60x Hrm:

www.analog.com/.../blackfin_hwr_bf60x_rev0.5.pdf

If the GPIO pins are assigned same PINTx block you have to use common ISR. But if GPIO pins are assigned to different PINTx block then you can use two different
ISR based on PINTx interrupt ID.

There is no need to use enable interrupts and disable interrupts. other than if it is required.

Please refer the below ezone theards:
ez.analog.com/.../how-to-convert-a-visual-dsp-project-to-cces-project
ez.analog.com/.../problems-porting-bf518-post-to-cces

Regards,
Anand Selvaraj.

Prakash Reply
Apr 30, 2020 00:00

Hi Anand,

Thanks. I'll check your inputs. Please keep thread open for few days.

Thanks,

Prakash

Prakash Reply
May 8, 2020 00:00

Hi Anand,

I checked the examples but could not found how to use certain IVGs.

Like, in my previous code with VisualDSP++ I have below statement for OS scheduler interrupt handler installation:

register_handler_ex(14, OS_Scheduler, EX_INT_DISABLE);

which I want to replace using new API in CCES:

adi_int_InstallHandler();

Please suggest some examples how to use this API in case of IVG14,15 and all core events like Reset, NMI, Exception etc.

Thanks,

Prakash

ADIApproved Reply
May 15, 2020 00:00

Hi,

The interrupt() functions that were used in VisualDSP++ to install interrupt handlers is not available in CCES. Instead we provide the Interrupt Service from the System Services library, which provides functions for installing, enabling and disabling interrupt handlers.

For instance,
"register_handler_ex(14, OS_Scheduler, EX_INT_DISABLE);" is used in VisualDSP++.

However when it come to CCES, you may have to use this in different way as given below.

#include <services/int/adi_int.h> /* Interrupt Handler API header. */

adi_int_InstallHandler(ADI_CID_xxx,ISR_name,0,true);

I suggest you to navigate through CCES help ( CrossCore Embedded Studio 2.x.x > System Run-Time Documentation > Interrupt Support ) for more information.

Regards,
Anand Selvaraj.

Prakash Reply
Aug 24, 2020 00:00

Hi Anand,

I am facing issue in executing my ISR declared as re-entrant. It is giving me 0x2E execption.

Can you please provide a working code example of re-entrant ISR on BF607? This is bit urgent as my deadline is approaching.

Thanks,

Prakash

ADIApproved Reply
Feb 5, 2021 00:00

Hi Prakash,

Apologies for the delay. Were you able to get going? Please let us know if you are still facing any issues.

Regards,
Anand Selvaraj