S32 Design Studio 3.6.2 generates invalid driver code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32 Design Studio 3.6.2 generates invalid driver code

ソリューションへジャンプ
218件の閲覧回数
durga_choudhury
Contributor III

Here are the relevant details:

S32 Design Studio for S32 Platform

Version: 3.6.2

Build id: 250529 (Update 2)

 

Target processor: S32K148

 

Autogenerated driver: Adc_Ip

 

The autogenerated code that seems invalid:

 

/**

* @brief ADC Ip Config for the ADC0 configuration variant .

*/

const Adc_Ip_ConfigType AdcHwUnit_0 =

{

ADC_IP_CLK_FULL_BUS, /* ClockDivide */

ADC_IP_CLK_EIGHTH_BUS, /* CalibrationClockDivide */

ADC_IP_CLK_ALT_1, /* InputClock */

1U, /* SampleTime */

(boolean)FALSE, /* AvgEn */

ADC_IP_AVG_4_CONV, /* AvgSel */

ADC_IP_RESOLUTION_12BIT, /* Resolution */

ADC_IP_TRIGGER_SOFTWARE, /* TriggerMode */

#if (ADC_IP_ENABLE_SIM_SOURCE_SELECTION == STD_ON)

ADC_IP_PRETRIGGER_SEL_PDB, /* PretriggerSel */

ADC_IP_TRIGGER_SEL_PDB, /* TriggerSel */

#endif /* (ADC_IP_ENABLE_SIM_SOURCE_SELECTION == STD_ON) */

(boolean)FALSE, /* DmaEnable */

ADC_IP_VOLTAGEREF_VREF, /* VoltageRef */

(boolean)FALSE, /* ContinuousConvEnable */

#if (ADC_IP_SUPPLY_MONITORING_ENABLED == STD_ON)

(boolean)FALSE, /* SupplyMonitoringEnable */

#endif /* (ADC_IP_SUPPLY_MONITORING_ENABLED == STD_ON) */

(boolean)FALSE, /* CompareEnable */

(boolean)FALSE, /* CompareGreaterThanEnable */

(boolean)FALSE, /* CompareRangeFuncEnable */

0U, /* CompVal1 */

0U, /* CompVal2 */

4U, /* UsrGain */

0U, /* UsrOffset */

1U, /* NumChannels */

AdcIpChansConfig_0, /* ChannelConfigs */

#if (ADC_IP_AIEN_INTERRUPT_ENABLE == STD_ON)

&NULL_PTR /* ConversionCompleteNotification */

#endif /* (ADC_IP_AIEN_INTERRUPT_ENABLE == STD_ON) */

};

 

(The line that fails to compile: &NULL_PTR)

 

The compiler (correctly) fails to compile this code with error:

lvalue required as unary '&' operand

 

Is this an user error on my part? If not, is a fix available or will become available?

 

Thanks

Durga Choudhury

 

0 件の賞賛
返信
1 解決策
160件の閲覧回数
durga_choudhury
Contributor III

Hello @VaneB 

 

Thank you very much for your help in this matter. This is more of a code formality issue for us ("was the auto-generated code altered in any way?") than a show stopper. This is not blocking us.

 

Regards

Durga Choudhury

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
161件の閲覧回数
durga_choudhury
Contributor III

Hello @VaneB 

 

Thank you very much for your help in this matter. This is more of a code formality issue for us ("was the auto-generated code altered in any way?") than a show stopper. This is not blocking us.

 

Regards

Durga Choudhury

0 件の賞賛
返信
149件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @durga_choudhury 

It is good to hear that it is not impacting your progress.

I will still make sure the team is aware, just in case it helps improve future versions of the tool or documentation.

0 件の賞賛
返信
164件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @durga_choudhury 

Thanks so much for your feedback. I took a look at the generated code and, as you pointed out, there is an error when assigning NULL_PTR to the Conversion Complete Notification. I will share this information with the appropriate team for further investigation.

In the meantime, here are a couple of quick suggestions that might help:

  • You can manually remove the "&" symbol from the ADC configuration struct. Please note that this character will be reinserted each time the code is updated in ConfigTools.
  • Alternatively, you could assign a dummy handler where the interrupt is disabled.

 

BR, VaneB

0 件の賞賛
返信