I have an older board with an S32K148 target, and a newer version of that board with same target.
On the old one I am able to Run my program with a release_flash configuration, and if I power cycle the target, the program will run correctly after power cycle.
On the new board I am also able to Run the release_flash configuration. However if I power cycle the board, the program does not run as expected. Either it is not starting from flash, or perhaps it is starting from flash but going to a DefaultISR, not sure.
I don't have a good idea how to debug this because the debugger connection is lost after power cycle. If I pause the debugger after program, then power cycle, then continue the debugger, it just jumps to DefaultISR.
Hopeful for any ideas on what this could be, or an approach on how to debug it.
Solved! Go to Solution.
Sorry, I saw that you mentioned that the hardware was slightly changed and I mistakenly thought that you were using a different project. Please allow me to summarize, and please correct me if there are any mistakes:
1. The exact same project and build settings worked fine on the old board, but not on the new one.
2. Same PartNumber: FS32K148UJT0VLQT
3. Different date/lot code: older(QAF1824F) newer(QJK2205AD)
4. The difference in the boards is fairly minor and the main changes are unrelated to the MCU.
If you accept to modify the project, then refer to the discussion here: How to print register in fault handler function using lpuart in S32K144
But if the above summary is correct, please try: Part Failure Vertification: A-B-A Swap Method
If it is suspected that the problem is caused by chip differences. Then the easiest way is to solder the older S32K148 (QAF1824F) to the new board to see if it works. Similarly, solder the newer S32K148 (QJK2205AD) to the old board for testing.
At present, it seems that only the circuit board and MCU are different, the rest are the same. In this way, you can find out whether the problem is caused by different circuits or if it is caused by different date/lot code of the chip.
Debug works fine with no fault.
Release runs correctly but then faults after Power cycle. Attach to running target I'm not sure what to do with because that goes straight to defaultISR / WDOG ISR.
I read your previous post: Adding a Release configuration . Is there any difference between your Release_FLASH and Debug_FLASH settings? For example, Optimization Level and Debug Level? This issue looks more like an issue with the S32DS build settings.
I'm confused why it could be a build setting - on the old board with the same exact project and build settings, the program runs correctly.
Is there a way to investigate how the default ISR is triggering on release? All I can do is connect to running target and see that it is in ISR.
Sorry, I saw that you mentioned that the hardware was slightly changed and I mistakenly thought that you were using a different project. Please allow me to summarize, and please correct me if there are any mistakes:
1. The exact same project and build settings worked fine on the old board, but not on the new one.
2. Same PartNumber: FS32K148UJT0VLQT
3. Different date/lot code: older(QAF1824F) newer(QJK2205AD)
4. The difference in the boards is fairly minor and the main changes are unrelated to the MCU.
If you accept to modify the project, then refer to the discussion here: How to print register in fault handler function using lpuart in S32K144
But if the above summary is correct, please try: Part Failure Vertification: A-B-A Swap Method
If it is suspected that the problem is caused by chip differences. Then the easiest way is to solder the older S32K148 (QAF1824F) to the new board to see if it works. Similarly, solder the newer S32K148 (QJK2205AD) to the old board for testing.
At present, it seems that only the circuit board and MCU are different, the rest are the same. In this way, you can find out whether the problem is caused by different circuits or if it is caused by different date/lot code of the chip.
I discovered there were errors in the code related to pins and interrupts that impacted the new board, but not the old board. So I was incorrect that the changes were minor.
I believe what was happening is that the start from flash was running correctly, but there were some issues in the code causing it to hang.
One thing I still don't understand is why the code ran normal in debug but not in release. I will try to dig in to understand what happened there, but for now I am pleased that the issue is past.
Thank you for your advice Robin, it was useful for me.
Hi Robin, thanks for response.
Just to be clear, this is not an EVB, this is my own PCB design.
I do have START_FROM_FLASH - the program does start successfully from flash on the older board. The difference in the boards is fairly minor and the main changes are unrelated to the MCU.
The CPU markings are the same (FS32K148UJVLQ / 0N20V) except for the date/lot code; the older one shows QAF1824F, and the newer one QJK2205AD.
Did you try to debug the new board? When single-step debug to which position will it enter hardfault? Please refer to Fault handling on S32K14x
Have you try to debug it without reset MCU: attach to the running target?
Hi
Compare the two S32K148 part number markings and compare the SCH versions of the two development boards. Is there any difference?
The same Jumper Setting and the same project, but different results are obtained after downloading the program to flash?
If it is a different project, check whether the "START_FROM_FLASH" Symbols are defined in the "Standard S32DS Assembler". By refer to image in S32K188 runs with debugger, but not witout
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.
-------------------------------------------------------------------------------