g_pin_mux_InitConfigArr0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

g_pin_mux_InitConfigArr0

Jump to solution
1,911 Views
samcs
Contributor II

Hi NXP support team,

I debugged the project, set break point at rtos_start(), in function: int main(void),

the first line.

the global should be initialized, but used PEMicro, on Expressions window, I found: 

g_pin_mux_InitConfigArr0[73]
Details:{

base = 0x0 <__isr_vector>,

pinPortIdx = 0,

pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,

passiveFilter = false,

driveSelect = PORT_LOW_DRIVE_STRENGTH,

mux = PORT_PIN_DISABLED,

pinLock = false,

intConfig = PORT_DMA_INT_DISABLED,

clearIntFlag = false,

digitalFilter = false,

gpioBase = 0x0 <__isr_vector>,

direction = GPIO_INPUT_DIRECTION, initValue = 0 '\0'}

this will cause a the program stopped at default ISR.

I searched  pinPortIdx in pin_mux.c, got:

board
pin_mux.c (73 matches)
124: .pinPortIdx = 10U,

So the issue is only 73 items in g_pin_mux_InitConfigArr0[];

but in pin_mux.c,

 /* Generate array of configured pin structures */
pin_settings_config_t g_pin_mux_InitConfigArr0[NUM_OF_CONFIGURED_PINS0] = {

#define NUM_OF_CONFIGURED_PINS0 77 // in pin_mux.h,

i am wondering why the NUM_OF is 77 in pin_mux.h, 

I am using S32 Design Studio for S32 Platform Version: 3.4,S32K1XX SDK RTM 4.0.2.

Any help would be much appreciated.

0 Kudos
1 Solution
1,848 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, I just tested it (PTA4, PTC3) and indeed the NUM_OF_CONFIGURED_PINS0 increments.

Also, there is no warning for PTC3.

I will report it.

Thanks for pointing it out.

 

BR, Daniel

 

View solution in original post

8 Replies
1,881 Views
samcs
Contributor II

Found the reason, seems some pins be assigned to more functions, then the NUM_OF value is not the number of pins, it's the number of  functions.

But S32DS For ARM IDE dees not have the issue. 

Don't know how to configure the macro in  pin_mux.h, have to change it manually?

0 Kudos
1,875 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @samcs,

Please double check the Configuration tool and update the code, the generated structure must match the settings there. Is the tool reporting any error?

danielmartynek_1-1648046548275.png

 

BR, Daniel

 

 

 

 

 

0 Kudos
1,866 Views
samcs
Contributor II

Even PTC2,PTC3 are dual functions pins, but the ConfigrTools not generated warnings.

 samcs_0-1648048409082.png

samcs_2-1648048535024.png

 

0 Kudos
1,858 Views
danielmartynek
NXP TechSupport
NXP TechSupport

PTC3 has two analog functions that are the default ALT0 functions.

danielmartynek_0-1648049030171.png

In other words, the PTC3 MUX needs a reconfiguration only of the pin is used with an alternative digital function.

 

BR, Daniel

 

0 Kudos
1,870 Views
samcs
Contributor II

Only got one warning, 

samcs_0-1648047986451.pngsamcs_1-1648048033950.png

I just wondering, why S32 Design Studio for ARM IDE, can handle More functions assigned on one pin, the generated code, here,PTA4, assigned  2 functions, but not affected the Macro definition in pin_mux.h.

 NUM_OF_CONFIGURED_PINS 

samcs_2-1648048264992.png

 

 

0 Kudos
1,862 Views
danielmartynek
NXP TechSupport
NXP TechSupport

JTAG_TMS/SWD_DIO is a single function of the PTA4 pin (ALT7).

danielmartynek_0-1648048828681.png

 

 

 

0 Kudos
1,853 Views
samcs
Contributor II

Thanks, so if the alt functions be configured both, then the generated code will configured twice? 

one pin will configured twice, then the NUM_OF_CONFIGURED will be 2 for one pin? 

 

 

0 Kudos
1,849 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Yes, I just tested it (PTA4, PTC3) and indeed the NUM_OF_CONFIGURED_PINS0 increments.

Also, there is no warning for PTC3.

I will report it.

Thanks for pointing it out.

 

BR, Daniel