Jump to content
    

TMS320F28335 не могу вызвать внешнее прерывание.

Здравствуйте всем.

Почему то не получается вызвать внешнее прерывание по входу GPIO58. Вот инициализация:

	InitPieCtrl();
    IER = 0x0000;
    IFR = 0x0000;

	InitPieVectTable();

	PieCtrlRegs.PIECTRL.bit.ENPIE = 1;          // Enable the PIE block
    PieCtrlRegs.PIEIER12.bit.INTx1 = 1;         // Enable PIE Group 12 INT1
 
	EALLOW;
    PieVectTable.XINT3 = &xint3_isr;
    EDIS

   	IER |= M_INT3;
	EINT;

    EALLOW;
    GpioCtrlRegs.GPBMUX2.bit.GPIO58 = 0;        // GPIO
    GpioCtrlRegs.GPBPUD.bit.GPIO58 = 1;
    GpioCtrlRegs.GPBDIR.bit.GPIO58 = 0;         // input
    GpioCtrlRegs.GPBQSEL2.bit.GPIO58 = 0;       // 
    EDIS;

    EALLOW;
    GpioIntRegs.GPIOXINT3SEL.bit.GPIOSEL = 26;   // Xint3 is GPIO58
    EDIS;

    XIntruptRegs.XINT3CR.bit.POLARITY = 0;      // Falling edge interrupt

    XIntruptRegs.XINT3CR.bit.ENABLE = 1;        // Enable Xint3

 

Share this post


Link to post
Share on other sites

Все, разобрался. Надо было в место  IER |= M_INT3; (это 3 группа, а не 3 прерывание) писать IER |= M_INT12; т.е. 12 группа. int3 находится в 12 группе.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...