Unable to Generate ADC0 pinmux code using processor expert for S32K148 EVB

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

Unable to Generate ADC0 pinmux code using processor expert for S32K148 EVB

3,314件の閲覧回数
dhirajtarole
Contributor III

Hi,

got some issue while generating processor expert code for pin configuration for  ADC0 in pin mux

step i have used is : 

1->opened pin mux ->selected Channel 0 PTA0 as input.

2-> cliicked on project tab --> clicked on generate processor expert code 

issue -> generated code not present in pinmux.c file.

0 件の賞賛
返信
9 返答(返信)

3,305件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@dhirajtarole

       the default setting of the ADC0->Channel0 is to select PTA0 as input, so the pin_mux.c may not be changed.

0 件の賞賛
返信

3,301件の閲覧回数
dhirajtarole
Contributor III

Hi,

but if we select multiple pin also ,the code will not generate in pin_mux.c file.

lets assume i have selected multiple pin like 

ADC0-> PTA1/PTA6/PTA7/PTB0/PTB1/PTB2/PTB3... INPUT and click on generates processor expert code 

code will not generated in pin_mux.c file as well.

see generated code below:

/* MODULE pin_mux. */
#include "device_registers.h"
#include "pin_mux.h"

/**
* @page misra_violations MISRA-C:2012 violations
*
*
* @section [global]
* Violates MISRA 2012 Advisory Rule 11.4, A conversion should not be performed
* between a pointer to object and an integer type.
* The cast is required to initialize a pointer with an unsigned int define,
* representing an address.
*
* @section [global]
* Violates MISRA 2012 Required Rule 11.6, A cast shall not be performed
* between pointer to void and an arithmetic type.
* The cast is required to initialize a pointer with an unsigned int define,
* representing an address.
*
* @section [global]
* Violates MISRA 2012 Advisory Rule 8.7, External variable could be made static.
* The external variables will be used in other source files in application code.
*
* @section [global]
* Violates MISRA 2012 Required Rule 9.3, partial array initialization.
* The object array is initialized sequentially.
*
* @section [global]
* Violates MISRA 2012 Required Rule 9.4, Duplicate initialization of object element.
* The object array is initialized sequentially.
*
*/

/*! @brief No pin was configured different with reset value */

/* END pin_mux. */
/*!
** @}
*/
/*
** ###################################################################
**
** This file was created by Processor Expert 10.1 [05.21]
** for the Freescale S32K series of microcontrollers.
**
** ###################################################################
*/

 

0 件の賞賛
返信

3,294件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@dhirajtarole

 can you tell me whicih IDE & SDK you are using?  I will double check it,

0 件の賞賛
返信

3,292件の閲覧回数
dhirajtarole
Contributor III

IDE - S32DS ARM 2.2

SDK - S32K148_SDK  Version : 3.0.0

0 件の賞賛
返信

3,286件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@dhirajtarole

we can do a test to troubleshoot the problem,

1. import the sample project in the SDK,for example.

a.import the demo: hello_world_s32k148

Senlent_0-1657261161618.png

b.made some changes,for example,we set the PTA0 to GPIO output,then generate the code.

Senlent_1-1657261776431.png

2. Check whether the updated results have changed       

Senlent_2-1657261932577.png

 

 

0 件の賞賛
返信

3,281件の閲覧回数
dhirajtarole
Contributor III
スポイラ
hi,

For GPIO it is working, we will get a code as shown in your pin_mux.c file.

can we get same code for ADC0 in pin_mux.c ?

lets assume, we need to perform ADC operation for that we are generating ADC0 code and calling ADC0 function in the main.c file.
1.will this ADC code will run without pin_mux configuration ?
2.or for ADC , in pinmux Direction are given default(INPUT). just we need to select on which pin we want for ADC Channel (using pin/Signal Selection) ? --(AT this condition it is not generating code)

thanks,

Screenshot (5).pngScreenshot (6).pngScreenshot (7).png


0 件の賞賛
返信

3,275件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport
0 件の賞賛
返信

3,272件の閲覧回数
dhirajtarole
Contributor III

hi,

thanks @Senlent , it is working.

could you pl find why this is not working for other pins.

And on the S32K148 EVB board pot is connected with PTC28 pin. so by using processor generate code we are unable to use that pin.

0 件の賞賛
返信

3,259件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@dhirajtarole

1. As we discussed before, most of the unused ports are set to ADC input by default
2. I don't quite understand your description about the PTC28 port.do you want to use this port? If yes, you can refer to adc_swtrigger_s32k148 this routine

 

0 件の賞賛
返信