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.
Hi @samcs,
Also under a discussussion in:
https://community.nxp.com/t5/S32-Design-Studio/g-pin-mux-InitConfigArr0/td-p/1432227
BR, Daniel
Hi @samcs,
Can you please specify the MCU, IDE version and version of drivers?
Or can you share a test project that could reproduce it?
Thank you,
BR, Daniel
i found the reason, it's 4 pins be assigned to more functions, dual functions.
I tried to remove a function,then update the code, for ex, PTA4 JTAG_TMS, SWD_DIO,
set it to JTAT_TMS only, then update code, then the macro in pin_mux.h,NUM_OF_CONFIGURED_PINS0 be updated to 76.
but I don't know how to let the Macro only be number of pins, not number of pin functions.