Announcements

Robots are revolutionizing our lives in many ways. Join our webinar to learn about Infineon’s broad portfolio of robot building blocks.
Click here to register.

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

AURIX™ Forum Discussions

AnilDhanawade
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

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
2 Replies
Prudhvi
Moderator
Moderator
Moderator
25 likes received 50 solutions authored 250 sign-ins

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
AnilDhanawade
Level 1
Level 1
5 replies posted 5 sign-ins First reply posted

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
This widget could not be displayed.