Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Legacy microcontrollers Forum Discussions

lech_4350316
Level 1
Level 1
First reply posted First question asked

Hello,

I'm using a MB9BF218S (LQFP-144) microcontroller.

I have a 50 Hz square wave signal connected to P57 (pin 20 = P57/SOT1_0/TIOB09_2/INT16_1/MNCLE_0) that I want to use to trigger an interrupt on the rising edge.

I configured it as follows :

PFR5 bit 7 = 0          (I also tried =1, same problem)

PCR5 bit 7 = 0

DDR5 bit 7 = 0

ELVR1.LA16=0, ELVR1.LB16=1 = rising edge mode

I'm 100% sure that P57 toggles every 10 ms (I read P57 GPIO pin every millisecond).

However, My ISR is running once only, immediately after setting ENIR bit 16 to 1.

In the ISR, I'm clearing EIRR bit 16, but it never gets set afterwards.

Is there anything else I have to do ?

Is there anything special with this INT16_1 pin on MB9BF218S  LQFP-144 ?

Please find below the code snippets relative to this interrupt configuration.

Thanks and Best Regards,

Christian.

initialization code :

  FM3_EXTI->ENIR_f.EN16 = 0;                // Disable External Interrupt INT16 before configuring it

  FM3_EXTI->ELVR1_f.LA16 = 0;

  FM3_EXTI->ELVR1_f.LB16 = 1;               // ELVR1.LA16 & LB16 = '01' = detect a rising edge

  NVIC_ClearPendingIRQ(EXINT8_31_IRQn);     // Reset pending External Interrupt Request ch.8 to ch.31

  NVIC_EnableIRQ(EXINT8_31_IRQn);           // Enable External Interrupt Request ch.8 to ch.31

  NVIC_SetPriority(EXINT8_31_IRQn, L3_IRQ_LEVEL_BT);       // Set interrupt priority

  FM3_EXTI->ENIR_f.EN16 = 1;                // Enable External Interrupt INT16

INT16 ISR :

void INT8_31_Handler ( void )

{

    volatile uint8_t dummy;

    if ( FM3_EXTI->EIRR_f.ER16 )

    {

        // Reset External Interrupt 16 flag

        dummy = FM3_EXTI->EIRR_f.ER16;

        FM3_EXTI->EICL_f.ECL16 = 0;

        dummy = FM3_EXTI->EIRR_f.ER16;

    }

}

0 Likes
1 Solution

No need to answer anymore.

We're changing the micro for a Renesas.

View solution in original post

0 Likes
5 Replies
lech_4350316
Level 1
Level 1
First reply posted First question asked

Hello,

Today, I tried using INT6, on P21, which is also an input tied to a square wave signal.

Same problem : INT6 IRQ is running once (when I change the ELVR register), an never after I clear EIRR bit 6.

I read P21 every ms, and I can see it toggle, but EIRR bit 6 remains equal to 0.

I also tried changing ELVR1.LA6 and LB6 values :

- LB6+LA6 = '00' (detect L) : the ISR runs constantly, even while P21 is High !!!

- LB6+LA6 = '01' (detect H) : the ISR never runs

- LB6+LA6 = '10' (detect rising edge) : the ISR never runs

- LB6+LA6 = '11' (detect falling edge) : the ISR never runs

I think there's something fundamentally wrong with the external interrupt config, but I can't figure out what it is.

Thanks for your help,

Christian.

0 Likes
Roy_Liu
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 5 questions asked

Hi,

You may have a look at the apps note which may help you.

https://www.cypress.com/documentation/application-notes/32-bit-microcontroller-fm3-family-interrupt-...

Roy Liu
0 Likes

Hello,

Thanks for your response, but according to your application note, the MB9BF218S micro does not support Interrupt factor vector relocate function. This is confirmed by "FM3 Peripheral Manual, Doc. No. 002-05586 Rev. *C", the MB9BF218S micro is a TYPE2, and as such, does not support Interrupt factor vector relocate function.

In addition, I have mentionned that the ISR is running once, the first time I change the ELVR.LA&B bits to detect rising edges, and not anymore after I clear the interrupt flag. I think it indicates that the problem is not an interrupt routing problem, but an external interrupt detection problem.

Regards,

Christian.

0 Likes

Hello,

Is someone from Cypress going to seriously look at my issue ?

My project is on hold for A WHOLE WEEK now because of this interrupt problem, and the only support I got is an application note that is not applicable to the microcontroller I mentioned in the post title.

Is this the right place to get suppport ?

Is this the support we get when using Cypress microcontrollers ?

I need help right away.

Please let me know how I can get efficient support from someone experienced in the MB9B210T Series.

Thanks.

0 Likes

No need to answer anymore.

We're changing the micro for a Renesas.

0 Likes