Not applicable
May 23, 2016
06:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 23, 2016
06:15 AM
I am trying to setup a queue source on the VADC to perform equidistant sampling of Group0, CH0. The distance between each sample should be 15.625us.
I would like to accumulate 4 consecutive samples before writing the result in a result register. When the result is written into the result register, an ISR should be called and P0.0 toggled.
I would like to use a CCU4 timer slice to repeatedly trigger this sequence.
Once the fourth sample of Group0_CH0 has been written into the result register, four consecutive samples of a second ADC channel, e.g. Group1, CH0, should be sampled as fast as the sampling unit allows. After the fourth sample an ISR should be called and P0.1 toggled.
The goal here is noise reduction. I am not sure whether to use a scan or queue source for sampling this second channel.
Can someone please explain the best way to do this?
I would like to accumulate 4 consecutive samples before writing the result in a result register. When the result is written into the result register, an ISR should be called and P0.0 toggled.
I would like to use a CCU4 timer slice to repeatedly trigger this sequence.
Once the fourth sample of Group0_CH0 has been written into the result register, four consecutive samples of a second ADC channel, e.g. Group1, CH0, should be sampled as fast as the sampling unit allows. After the fourth sample an ISR should be called and P0.1 toggled.
The goal here is noise reduction. I am not sure whether to use a scan or queue source for sampling this second channel.
Can someone please explain the best way to do this?
Labels
2 Replies
May 24, 2016
01:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 24, 2016
01:34 AM
Hi,
// Result register 1
{
.post_processing_mode = XMC_VADC_DMM_REDUCTION_MODE, //DMM = 0 (Data reduction mode)
#if DATA_REDUCTION
.data_reduction_control = 1, //DRCTR = 1 (Accumulate 2 result value)
//.data_reduction_control = 2, //DRCTR = 1 (Accumulate 2 result value)
#else
.data_reduction_control = 0, //DRCTR = 0 (Data reduction disabled)
#endif
Attachments are accessible only for community members.
May 24, 2016
01:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 24, 2016
01:41 AM