This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

XRDY ISR

Other Parts Discussed in Thread: TMS320DM6437

Hello,

In fact, it's my first time to work with DSP in general, I found many problems.

  Now, I'm working with TMS320DM6437, I try to make the configuration of McBSP port interface  as an SPI slave. For this, I'm following steps montionned in McBSP user's guide.

 In this user's guide there are many initialization procedures, as I understand I have to work with this:

 Initialization Procedure When External Device is Frame Sync Master

At the start of this procedure they say:

The initialization procedure assumes the following:
• Using a GPIO pin multiplexed with the McBSP FSX signal. If a dedicated GPIO pin is used instead,
skip step 1 and step 8b.
• Software polls the GPIO pin to detect the first frame sync. If the GPIO interrupt is used instead to detect the first frame sync, step 8 can be performed within an interrupt service routine (ISR).

Ok, for me I used a dedicated GPIO pin GPIO[105] and I  polled the GPIO by the CCS.

I didn't found any problem in the instructions untill number 8 to the end which is:

8. Poll the GPIO pin (through reading the appropriate registers in the GPIO peripheral) to detect the first
transmit frame sync from the external device. Upon detection of the first frame sync, perform the
following in this order:

...not important
9. Service the McBSP:
a . If CPU polling is used to service the McBSP in normal operations, it can do so upon exit from the
ISR.
b . If the CPU interrupt is used to service the McBSP in normal operations, upon XRDY interrupt
service routine is entered. The ISR should be setup to verify that XRDY = 1 and service the McBSP
accordingly.
c . If the EDMA controller is used to service the McBSP in normal operations, it services the McBSP transmit the valid data. The receiver is also serviced properly by the DSP.

for me I will work with 9.b ---> CPU interrupt

My questions are:

*Is this need to use the DSP/BIOS Kernel?

*Normally, I will not use the GPIO interrupt, but to detect the frame synchronazation is it considered as a HWI interruption?

*Who can I setup the XRDY ISR? Is there  predefined fonctions in CCS help me to make this?Where I have declare the function of ISR?

Regards,

 

  • Dazza Dawla said:
    *Is this need to use the DSP/BIOS Kernel?

    Need is a relative term, you can certainly do without it, but in general I would recommend it, as it manages a lot of lower level work for you, such as managing interrupts.

    Dazza Dawla said:
    *Normally, I will not use the GPIO interrupt, but to detect the frame synchronazation is it considered as a HWI interruption?

    If you are using BIOS than you would configure a HWI to trigger off of that GPIO and run your ISR function, so yes it would be a HWI interrupt. If you were not using BIOS you would have to configure the interrupt controller and interrupt vector table manually so that it runs your ISR function.

    Dazza Dawla said:
    *Who can I setup the XRDY ISR? Is there  predefined fonctions in CCS help me to make this?Where I have declare the function of ISR?

    Since the DM6437 is targeted at a BIOS centric application there are not other pre defined functions out there to help set up interrupts (what would have been known as functional CSL in the past), developers are generally expected to use BIOS to manage the interrupts so such other functions are not needed. To start out you may want to configure your interrupt statically in the BIOS configuration file (.tcf), you simply use the GUI configuration editor to select the HWI and tell it to use the dispatcher and give it the function you want it to call. As to declaring the function, you can use any regular C function for your ISR, it just has to be setup in the BIOS configuration.

    If you were to do this entirely from APIs within your code, you would use the various HWI calls described within the DSP/BIOS API Guide. Remember to enable interrupts with HWI_enable() once your interrupts are configured to ensure they are able to run.

  • Hi Bernie,

    Thank you for your detailed explanation, but untill now I didn't understand how the ISR will be runned, may be it's easy to do but as I told you I'm new in this demain and I found lot of difficulties.Besides, in the company there are no one have a good idea about this deal.

    Ok, normally the signal of first frame synchronazation will come from the ARM to enter in the GPIO[105] pin of DM6437, as I told you I will not use the interruption afforded by the GPIO, I will use it just to detect the signal

    Well,could you take a look to the instructions number 8 and number 9 of user's guide McBSP in my first message

    In fact, for the GPIO[105] pin it seems that it's not necessaire to declare it as a HWI because it's role just to be polled with the software to make some instructions after.

    Am I wrong?

    On the other hand, I will use the XRDY ISR provided by the McBSP with RINT and XINT.

    Normally, these two signals must be declared as a HWI with two ISR functions. Is this true or no?

    Also, in the DSP/BIOS configuration should I make other configurations besides the HWI configurations ? I want just names of modules...

    In HWI module for DM6437 platform, there are many types of HWI: HWI_RESERVED0,HWI_RESERVED1 these two HWI can I use them? Besides,what's the role of ECM (Event Combiner Manager) in this Module?

    Regards,