MCU: S32K148 144pin
I have a separate IC that when connected holds pin 141 (PTA5/TCLK1/RESET_b) low. When powered, it seems the MCU is held in reset such that it cannot be programmed.
I checked the processor expert configuration. Pin mux settings show GPIO PTA5 set as an input. Under "Platform" tab of pin mux config, Reset shows "no pin routed", and if you wanted to route it, it shows a conflict as PTA5 is already configured.
In Debug I check the EMB_SYS FTFC FOPT register. This shows 0x00, so I think the pin should be disabled.
I suspect that means if it is disabled you can't reset once things are up and running, but if you turn it on with the reset_b held low it will be stuck in reset, and there is nothing you can do as far as register settings go to change that. Is that correct?
Side-question -
What is the correct way to set the FOPT RESET_PIN_CFG using the processor expert? I found the flash component, but i'm not sure what function or macros to use.
Solved! Go to Solution.
Hi m_mishrikey,
Please change the Flash Configuration in Startup_S32K148.S
The default value of FOPT is 7F, since you want to clear bit 3 RESET_PIN_CFG, please change it to 77.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" 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.
-------------------------------------------------------------------------------
I tested, and this solution works.
I wish I understood better though. When I checked the emb_sys register the FOPT was 0x00 which should have disabled it.
I guess the startup behavior is different though, and it is governed by this startup_S32K148.S? Is there some documentation about using this file? I don't think I ever would have figured it out with your help.
Thank you!
Flash Configuration block : 16-byte flash configuration field that stores default protection settings (loaded on reset) and security information that allows the MCU to restrict access to the Flash Memory module. Placed at address 0x400 by the linker script.
Hi m_mishrikey,
Please change the Flash Configuration in Startup_S32K148.S
The default value of FOPT is 7F, since you want to clear bit 3 RESET_PIN_CFG, please change it to 77.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" 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.
-------------------------------------------------------------------------------