Interrupts are not working parallelly

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

cross mob
lock attach
Attachments are accessible only for community members.
AnilDhanawade
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello All,

 

Controller: TC213L

I am working on the Motor application, I am using PWM based ADC trigger code.

Also, I need a GPIO interrupt, I have void initPeripheralsAndERU(void) function to init the GPIO interrupt. Separately both the interrupts are working fine, but if I combine both the codes and try to run then it is not working. void BSW_MotorControl_PWM_Drv_Init(void) This is the function to init the PWM trigger for ADC.

 

To run the parallelly, what are the settings need to be changed?

I have attached both codes for the reference. 

Solved: TC213L - GPIO interrupt facility - Infineon Developer Community - this is the GPIO interrupt question thread for reference. 

Regards,

Anil Dhanawade.

 

 

0 Likes
3 Replies
Prudhvi_E
Moderator
Moderator
Moderator
250 replies posted 100 solutions authored 25 likes received

Hello,

Can you please check the below configuration in your code if that is intended?

                              adc_trigger_config.base.isrPriority = 0;

An ISR shall not have priority of '0'. If you're using the parameter can you modify to a non-zero value and check?

Regards,

Prudhvi.

0 Likes

Prudhvi,

 

Is there any other way to test my requirement. because, if it is not possible to test then we need to look for the other solution for the stated question. 

0 Likes
AnilDhanawade
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

Hello,

 

If I have done the above settings, then code is not working. automatically code is stopped. 

If I made it to zero (0) as previous, that time at least my code is working. but If I changed to 1 then code is stopped after some time(Init).

  1. adc_trigger_config.base.isrPriority = 1; - Both the interrupts are not hitting. (Both interrupts are NOT coming - ideally GPIO interrupt should not come, when REQ_PIN is high/low then only it should come.)
  2. adc_trigger_config.base.isrPriority = 39; - only GPIO interrupts is hitting. (PWM interrupt is not coming)
  3. adc_trigger_config.base.isrPriority = 40; - only GPIO interrupts is hitting. (PWM interrupt is not coming)
  4. adc_trigger_config.base.isrPriority = 41; - Both the interrupts are hitting. (Both interrupts are coming - ideally GPIO interrupt should not come, when REQ_PIN is high/low then only it should come.)
  5. adc_trigger_config.base.isrPriority = 100; - Both the interrupts are hitting. (Both interrupts are coming - ideally GPIO interrupt should not come, when REQ_PIN is high/low then only it should come.)

NOTE: GPIO Interrupt priority is 40.

My every line of code is working perfectly, before adding this GPIO interrupt, but after adding this only, I am not getting the correct results.

 

Regards,

Anil Dhanawade.

0 Likes