This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

anybody is there who works on MCBSTR9 Evaluation Board

hai,
anybody is there who works on MCBSTR9 Evaluation Board.

thanks
raj.

Parents
  • OK I finally got it.

    Here is the solution:

    //P3 configuration

    SCU->GPIOOUT[3] &= 0xC3FF;
    GPIO3->DDR &= 0x9F;

    //WIU (AND SCU!!!) configuration
    //Hey, I didn't did this before!!!!

    SCU->PCGR1 |= 0x00002000;
    SCU->PRR1 |= 0x00002000;

    WIU->MR |= ~0x00000003;
    WIU->CTRL |= 0x00000002;

    SCU->WKUPSEL |= 0x00000005;

    //VIC configuration

    VIC1->VAiR[10] = (unsigned int)Switch_IRQ_Handler;
    VIC1->VCiR[10] |= 0x20;
    VIC1->VCiR[10] |= 10;
    VIC1->INTER |= (1<<10);

    And that's all to generate external interrupt by S2 (or other WIU sources).

    Don't forget to acknowledge the interrupt in handler function and to clear EXTINT5 bit (WIU->PR |= 0x00000020;)

    You can also work with ST librarys if you don't like to work at bit level. They got smart functions that do it for you.

    Bye!

Reply
  • OK I finally got it.

    Here is the solution:

    //P3 configuration

    SCU->GPIOOUT[3] &= 0xC3FF;
    GPIO3->DDR &= 0x9F;

    //WIU (AND SCU!!!) configuration
    //Hey, I didn't did this before!!!!

    SCU->PCGR1 |= 0x00002000;
    SCU->PRR1 |= 0x00002000;

    WIU->MR |= ~0x00000003;
    WIU->CTRL |= 0x00000002;

    SCU->WKUPSEL |= 0x00000005;

    //VIC configuration

    VIC1->VAiR[10] = (unsigned int)Switch_IRQ_Handler;
    VIC1->VCiR[10] |= 0x20;
    VIC1->VCiR[10] |= 10;
    VIC1->INTER |= (1<<10);

    And that's all to generate external interrupt by S2 (or other WIU sources).

    Don't forget to acknowledge the interrupt in handler function and to clear EXTINT5 bit (WIU->PR |= 0x00000020;)

    You can also work with ST librarys if you don't like to work at bit level. They got smart functions that do it for you.

    Bye!

Children
No data