Sep 24, 2019
11:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2019
11:48 PM
Hi,
I'm trying to configure a simple programm, that starts the adc conversion with every pwm lrisng edge. I'm using the xmc1302 and DAVE Project. Can anybody guide me, how I have to set up the apps?
To generate the pwm I'm using CCU4, for the adc ADC_Measurement_ADV.
Question: do I need the event generator and event detector?
Thank you in advance.
Pablo
I'm trying to configure a simple programm, that starts the adc conversion with every pwm lrisng edge. I'm using the xmc1302 and DAVE Project. Can anybody guide me, how I have to set up the apps?
To generate the pwm I'm using CCU4, for the adc ADC_Measurement_ADV.
Question: do I need the event generator and event detector?
Thank you in advance.
Pablo
- Tags:
- IFX
4 Replies
Oct 03, 2019
11:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 03, 2019
11:36 PM
Hi,
nobody can tell me how does the synchronization work?
Thank you
nobody can tell me how does the synchronization work?
Thank you
Oct 04, 2019
05:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2019
05:28 AM
Hi,
Have a look at the DAVE4 examples, https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html. If you filter by ADC you will find examples matching exactly what you are trying to do.
BTW: You do not need the event routing (using ERU).
Regards,
Jesus
Have a look at the DAVE4 examples, https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html. If you filter by ADC you will find examples matching exactly what you are trying to do.
BTW: You do not need the event routing (using ERU).
Regards,
Jesus
Oct 04, 2019
05:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 04, 2019
05:41 AM
Hi,
I had a quick look at your application use case so here is what I think it should work for you:
Under "16.17.3 Digital Module Connections in the XMC1300" chapter you can find following section:
You can see that you can connect trigger input by connecting CCU40.SR2/3 signal from CCU4 module. What are those signals from CCU4 module? Well you can find that the following figure in the CCU4 chapter to help you have better understanding of these signals.
So an interrupt event will generate these signals which can the be used to connect to trigger input of ADC module.
When we want to convert that in DAVE APPs settings:
I guess this should help you getting started with your application use case.
Best regards,
Deni
I had a quick look at your application use case so here is what I think it should work for you:
Under "16.17.3 Digital Module Connections in the XMC1300" chapter you can find following section:
You can see that you can connect trigger input by connecting CCU40.SR2/3 signal from CCU4 module. What are those signals from CCU4 module? Well you can find that the following figure in the CCU4 chapter to help you have better understanding of these signals.
So an interrupt event will generate these signals which can the be used to connect to trigger input of ADC module.
When we want to convert that in DAVE APPs settings:
I guess this should help you getting started with your application use case.
Best regards,
Deni
Oct 21, 2019
08:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 21, 2019
08:51 AM
Hi everybody,
thank you for your answer. The synchronization worked yet but I'm experiencing some strange problems. I switch the pwm on and off. On in my main loop and off in my adc callback function. In debug mode everything works well but in release mode the pwn starts once and it doesn't work anymore.
Following you see the configuration of the pwm's and the start and stop commands.
Stopping pwm's in adc callback function:
Configuration from pwm's at start of the programm:
Restart from pwm's in main loop:
Can anybody tell me why the pwm's starts once in release mode?
Thank you in advance.
Pablo
thank you for your answer. The synchronization worked yet but I'm experiencing some strange problems. I switch the pwm on and off. On in my main loop and off in my adc callback function. In debug mode everything works well but in release mode the pwn starts once and it doesn't work anymore.
Following you see the configuration of the pwm's and the start and stop commands.
Stopping pwm's in adc callback function:
void Adc_Measurement_ADV_Callback()
{
if(sig_cntresult_POTI= ADC_MEASUREMENT_ADV_GetResult(&ADC_MEASUREMENT_ADV_0_POTI_handle);//ADC_MEASUREMENT_GetResult(&ADC_MEASUREMENT_POTI_handle);
result_REF = ADC_MEASUREMENT_ADV_GetResult(&ADC_MEASUREMENT_ADV_0_REFERENCE_handle);
result_G1 = ADC_MEASUREMENT_ADV_GetResult(&ADC_MEASUREMENT_ADV_0_SIG_IN_G1_handle);
result_G2[sig_cnt] = ADC_MEASUREMENT_ADV_GetResult(&ADC_MEASUREMENT_ADV_0_SIG_IN_G2_handle);//
if(sig_cnt==SAMPLES-1){
PWM_CCU8_Stop(&PWM_CCU8_0_ADC_Trigger);
PWM_CCU8_Stop(&PWM_CCU8_0_LED_Output);
current_State = DATA_CONVERSION; //ADC_BUFFER_FULL;
sig_cnt = 0;
}
else{
current_State= ADC_UPDATE;
sig_cnt++;
}
}
}
Configuration from pwm's at start of the programm:
PWM_CCU8_Start(&PWM_CCU8_0_ADC_Trigger);
PWM_CCU8_Start(&PWM_CCU8_0_LED_Output);
status = PWM_CCU8_SetDutyCycleSymmetric(&PWM_CCU8_0_LED_Output, XMC_CCU8_SLICE_COMPARE_CHANNEL_1 ,5000);
status = PWM_CCU8_SetDutyCycleSymmetric(&PWM_CCU8_0_ADC_Trigger, XMC_CCU8_SLICE_COMPARE_CHANNEL_1 , 5000);
GLOBAL_CCU8_SyncStartTriggerHigh(GLOBAL_CCU8_CCUCON_Msk);
Restart from pwm's in main loop:
PWM_CCU8_Start(&PWM_CCU8_0_ADC_Trigger);
PWM_CCU8_Start(&PWM_CCU8_0_LED_Output);
GLOBAL_CCU8_SyncStartTriggerLow(GLOBAL_CCU8_CCUCON_Msk);
GLOBAL_CCU8_SyncStartTriggerHigh(GLOBAL_CCU8_CCUCON_Msk);
Can anybody tell me why the pwm's starts once in release mode?
Thank you in advance.
Pablo