- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
- 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.)
- adc_trigger_config.base.isrPriority = 39; - only GPIO interrupts is hitting. (PWM interrupt is not coming)
- adc_trigger_config.base.isrPriority = 40; - only GPIO interrupts is hitting. (PWM interrupt is not coming)
- 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.)
- 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.