- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think I found a bug in the PDL v2.1.0 in adc.c. There are 2 macro names used that are not defined: FM_ADC0_SCTSL_AVAILABLE and FM_ADC0_PRTSL_AVAILABLE. The correct names, as defined in the s6exxxxx.h files, should be FM_ADC_SCTSL_AVAILABLE and FM_ADC_PRTSL_AVAILABLE respectively (without the "0" after "ADC"). There are 3 lines where one or both macros appear (see diff below).
--- a/PDL/2.1.0/drivers/adc/adc.c
+++ b/PDL/2.1.0/drivers/adc/adc.c
@@ -485,7 +485,7 @@ en_result_t Adc_Init( volatile stc_adcn_t* pstcAdc,
return ErrorInvalidParameter;
}
- #if defined(FM_ADC0_SCTSL_AVAILABLE)
+ #if defined(FM_ADC_SCTSL_AVAILABLE)
// Scan Conversion Timer Start Enable and Timer Source
if (TRUE == pstcConfig->pstcScanInit->bScanTimerStartEnable)
{
@@ -516,7 +516,7 @@ en_result_t Adc_Init( volatile stc_adcn_t* pstcAdc,
// Priority external Trigger Start Enable
stcPCCR.PEEN = (TRUE == pstcConfig->pstcPrioInit->bPrioExtTrigStartEnable) ? 1u : 0u;
- #if defined(FM_ADC0_PRTSL_AVAILABLE)
+ #if defined(FM_ADC_PRTSL_AVAILABLE)
// Priority Conversion Timer Start Enable and Timer Source
if (TRUE == pstcConfig->pstcPrioInit->bPrioTimerStartEnable)
{
@@ -729,7 +729,7 @@ en_result_t Adc_DeInit( volatile stc_adcn_t* pstcAdc, boolean_t bTouchNvic )
pstcAdc->WCMRCOT = 0u;
pstcAdc->WCMRCIF = 0u;
#endif
-#if defined(FM_ADC0_SCTSL_AVAILABLE) && defined(FM_ADC0_PRTSL_AVAILABLE)
+#if defined(FM_ADC_SCTSL_AVAILABLE) && defined(FM_ADC_PRTSL_AVAILABLE)
pstcAdc->SCTSL = 0u;
pstcAdc->PRTSL = 0u;
#endif
Best regards,
Thomas
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will not be fixed in a new version of PDL(for FMx devices), instead users can refer to the knowledge base article in the following page when using PDL 2.1.0.
Wrong ADC Macro Names Used in adc.c in PDL 2.1.0 - KBA228999
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reporting, will ask the author of the PDL to check and get back to this discussion.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thank you for your report, we will modify it.
the following grey code is invalid in adc.c, due to FM_ADC0_SCTSL_AVAILABLE do not be defined.
it should be FM_ADC_SCTSL_AVAILABLE defined in header file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will not be fixed in a new version of PDL(for FMx devices), instead users can refer to the knowledge base article in the following page when using PDL 2.1.0.
Wrong ADC Macro Names Used in adc.c in PDL 2.1.0 - KBA228999