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.
the default setting of the ADC0->Channel0 is to select PTA0 as input, so the pin_mux.c may not be changed.
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.
**
** ###################################################################
*/
can you tell me whicih IDE & SDK you are using? I will double check it,
IDE - S32DS ARM 2.2
SDK - S32K148_SDK Version : 3.0.0
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
b.made some changes,for example,we set the PTA0 to GPIO output,then generate the code.
2. Check whether the updated results have changed
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.
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