MCAL Port_Init(NULL_PTR) error

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

MCAL Port_Init(NULL_PTR) error

Jump to solution
781 Views
jwjung
Contributor II

hi, 

 

i tried to use port driver of MCAL.

 

but whenever i initialize the Port Driver the error was occurred and debugger be disconnected.

 

and F/W seems to be working.(is that reset?)

 

so can you find the way do not occurred the error?

 

jwjung_0-1755740652121.png

jwjung_1-1755740693453.png

 

 

attachment

chip : NXP S32K312

RTD : SW32K3_RTD4.4_R11-21_3.0.0_DS2303

DS : S32 Design Studio for S32 Platform, Version: 3.5

0 Kudos
Reply
1 Solution
763 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Please check whether the debug pins are still present in the UnTouchedPortPin field.

If you refer to the S32K3 PORT Driver User Manual(RTD_PORT_UM.pdf), you will find an important note:
In order to be able to use the debug capabilities, the JTAG and Reset pins need to be configured in the Port driver using mechanism B. This means that the following pins/functionalities need to be added in the UnTouchedPortPin list:
– Reset_b having PortPin Mscr set to 5 and SIUL2 Instance set to SIUL2_0
– JTAG_TMS having PortPin Mscr set to 4 and SIUL2 Instance set to SIUL2_0
– JTAG_TDO having PortPin Mscr set to 10 and SIUL2 Instance set to SIUL2_0
– JTAG_TCK having PortPin Mscr set to 68 and SIUL2 Instance set to SIUL2_0
– JTAG_TDI having PortPin Mscr set to 69 and SIUL2 Instance set to SIUL2_0


If you have modified the debug pin functionality, can you try this solution?

https://community.nxp.com/t5/S32-SDK/failed-to-power-up-dap-after-program-s32k312-with-pll0-equal/td...

If you have also reconfigured the Reset_b pin (PTA5), the MCU can only be reset by a POR.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

0 Kudos
Reply
3 Replies
764 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Please check whether the debug pins are still present in the UnTouchedPortPin field.

If you refer to the S32K3 PORT Driver User Manual(RTD_PORT_UM.pdf), you will find an important note:
In order to be able to use the debug capabilities, the JTAG and Reset pins need to be configured in the Port driver using mechanism B. This means that the following pins/functionalities need to be added in the UnTouchedPortPin list:
– Reset_b having PortPin Mscr set to 5 and SIUL2 Instance set to SIUL2_0
– JTAG_TMS having PortPin Mscr set to 4 and SIUL2 Instance set to SIUL2_0
– JTAG_TDO having PortPin Mscr set to 10 and SIUL2 Instance set to SIUL2_0
– JTAG_TCK having PortPin Mscr set to 68 and SIUL2 Instance set to SIUL2_0
– JTAG_TDI having PortPin Mscr set to 69 and SIUL2 Instance set to SIUL2_0


If you have modified the debug pin functionality, can you try this solution?

https://community.nxp.com/t5/S32-SDK/failed-to-power-up-dap-after-program-s32k312-with-pll0-equal/td...

If you have also reconfigured the Reset_b pin (PTA5), the MCU can only be reset by a POR.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply
741 Views
jwjung
Contributor II

thanks for reply robin.

 

solve the error and confirm the User Manual for RTD Port Driver.

 

thank you.

0 Kudos
Reply
777 Views
jwjung
Contributor II

run the Port_Init(NULL_PTR);

Port Configuration\ConfigTimeSupport\Config Variant\VARIANT-PRE-COMPLE.

 

if not, the error does not occur, but the F/W does not work either.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2155604%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMCAL%20Port_Init(NULL_PTR)%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2155604%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ehi%2C%26nbsp%3B%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ei%20tried%20to%20use%20port%20driver%20of%20MCAL.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Ebut%20whenever%20i%20initialize%20the%20Port%20Driver%20the%20error%20was%20occurred%20and%20debugger%20be%20disconnected.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eand%20F%2FW%20seems%20to%20be%20working.(is%20that%20reset%3F)%3C%2FP%3E%3CBR%20%2F%3E%3CP%3Eso%20can%20you%20find%20the%20way%20do%20not%20occurred%20the%20error%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jwjung_0-1755740652121.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jwjung_0-1755740652121.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353399i7E184010870C3C25%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jwjung_0-1755740652121.png%22%20alt%3D%22jwjung_0-1755740652121.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22jwjung_1-1755740693453.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22jwjung_1-1755740693453.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F353400i319E6BD7804AD1C3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22jwjung_1-1755740693453.png%22%20alt%3D%22jwjung_1-1755740693453.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3Eattachment%3C%2FP%3E%3CP%3Echip%20%3A%20NXP%20S32K312%3C%2FP%3E%3CP%3ERTD%20%3A%20SW32K3_RTD4.4_R11-21_3.0.0_DS2303%3C%2FP%3E%3CP%3EDS%20%3A%20S32%20Design%20Studio%20for%20S32%20Platform%2C%26nbsp%3BVersion%3A%203.5%3C%2FP%3E%3C%2FLINGO-BODY%3E