Apr 19, 2020
07:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 19, 2020
07:47 PM
Two ADC groups are used. The calibration does not complete during startup of the device.
The code is stuck in 'while' loop and the powerup of device fails due to failing ADC calibration.
From the code snippet below :
void XMC_VADC_GLOBAL_StartupCalibration(XMC_VADC_GLOBAL_t *const global_ptr)
{
global_ptr->GLOBCFG |= (uint32_t)VADC_GLOBCFG_SUCAL_Msk;
/* Loop until all active groups finish calibration */
for(i=0U; i < 2U; i++)
{
group_ptr = g_xmc_vadc_group_array;
if ( (group_ptr->ARBCFG) & (uint32_t)VADC_G_ARBCFG_ANONS_Msk)
{
/* This group is active. Loop until it finishes calibration */
while((group_ptr->ARBCFG) & (uint32_t)VADC_G_ARBCFG_CAL_Msk)
{
/* NOP */
}
}
}
Please advice.
The code is stuck in 'while' loop and the powerup of device fails due to failing ADC calibration.
From the code snippet below :
void XMC_VADC_GLOBAL_StartupCalibration(XMC_VADC_GLOBAL_t *const global_ptr)
{
global_ptr->GLOBCFG |= (uint32_t)VADC_GLOBCFG_SUCAL_Msk;
/* Loop until all active groups finish calibration */
for(i=0U; i < 2U; i++)
{
group_ptr = g_xmc_vadc_group_array;
if ( (group_ptr->ARBCFG) & (uint32_t)VADC_G_ARBCFG_ANONS_Msk)
{
/* This group is active. Loop until it finishes calibration */
while((group_ptr->ARBCFG) & (uint32_t)VADC_G_ARBCFG_CAL_Msk)
{
/* NOP */
}
}
}
Please advice.
3 Replies
Apr 20, 2020
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 20, 2020
06:28 AM
Which device are you using?
Apr 23, 2020
06:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 23, 2020
06:34 PM
Its a pick and place robot arm used for SMT. The microcontroller is XMC4700.
Could you kindly advice on why the CAL bit is not set to 1 ?
Thank you.
Could you kindly advice on why the CAL bit is not set to 1 ?
Thank you.
Jun 08, 2020
02:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 08, 2020
02:03 AM
Hi,
Could you post the complete initialization code?
See https://www.infineon.com/dgdl/Infineon-VADC-XMC4000-AP32305-AN-v01_02-EN.pdf?fileId=5546d4624e765da5... and the associated code https://www.infineon.com/dgdl/Infineon-VADC-XMC4000-AP32305_Example_Code-AN-v01_02-EN.zip?fileId=554...
Regards,
Jesus
Could you post the complete initialization code?
See https://www.infineon.com/dgdl/Infineon-VADC-XMC4000-AP32305-AN-v01_02-EN.pdf?fileId=5546d4624e765da5... and the associated code https://www.infineon.com/dgdl/Infineon-VADC-XMC4000-AP32305_Example_Code-AN-v01_02-EN.zip?fileId=554...
Regards,
Jesus