S32K311 MCU unlock Question

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

S32K311 MCU unlock Question

725 Views
PangeoTony
Contributor I

Hi,

We have encountered a problem after flashed our MCAL code into the S32K11 chip which seems locked the MCU. We figured out that the MCU is locked as we selected the wrong Flash Algorithm(screenshot below). We selected the first option hse_disabled before but we did not implemented any HSE in our MCAL code. (so we always get a runtime error when loading programming algorithm every time we try to re-program the chip) We did further test with flash our code with the third option ab_swap and the problem got solved. However, we did not figure out how to unlock the MCU we tested before. Can we get some help on this? (we are using PE micro Multilink universal Rev E for flash) Thank you!

PangeoTony_0-1717725144946.jpeg

Thanks,

Tony

 

0 Kudos
Reply
5 Replies

707 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @PangeoTony 

Please help clarifiying some information. You said that you had not implemented HSE on your code, but you also said you used the A/B SWAP algorithm which only can be used when HSE is installed. So, is HSE installed or not on your device? 

Also, could you provide more information about the MCU behavior? 

 

B.R.

VaneB

0 Kudos
Reply

668 Views
PangeoTony
Contributor I

Hi VaneB,

Thank you for your reply! We did more tests recently and have some new findings which might could clarify the situation (as we are new to the S32 there were mistakes made both hardware side and software side most likely), the original post has lots of our assumption and is not correct. Sorry about the confusion because we are also confused about the behavior. 

Below is the Runtime error we got when we try to flash to our locked MCU (it would stuck at the loading flash algorithm...)

PangeoTony_0-1718072226770.jpeg

The recent finding is more on the hardware side. We are using SWD for debugging and on our original designed board the reset pin is not connected. After connect the reset pin/port the lock MCU issue is solved (did several of tests with debug + DisableHSE setting). However, we are not able to unlock the locked MCUs even we connect the reset pin/port. If based on our description, the reset pin is the root cause, is there any way to unlock the locked MCUs? (like completely erase what has been flashed into the memory) Thank you!

Best regards,

Tony

 

0 Kudos
Reply

654 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @PangeoTony 

Are you seeing this error only on your custom project? Can you create a blank "S32DS Application Project" or a "Project From Example" and see if you get the same error?

On the board that is failing, did the board ever work before? Did you program or enable the HSE firmware?

0 Kudos
Reply

632 Views
PangeoTony
Contributor I

Hi VaneB,

Are you seeing this error only on your custom project?

Yes, this only occurred in our custom project with MCAL implemented. 

Can you create a blank "S32DS Application Project" or a "Project From Example" and see if you get the same error?

Sorry I forgot to mention that we did try a demo code with freemaster (No MCAL implemented) and this code can be flashed normally to the MCU and can be reflashed/debug normally without connect the reset pin. But the code with MCAL implemented locked the chip after flashed.

On the board that is failing, did the board ever work before? Did you program or enable the HSE firmware?

Yes, sorry for the confusion. The boards failed were working the first time we flashed our custom project(MCAL implemented), it can be debugged and after one power reset, the MCU seems got locked and we cannot flash or debug. (While the MCU seems still running the code flashed before, we only put init MCU and delay in our main function). We did not implement HSE and most of the board failed before is flashed with HSE disable option. We found out that with the reset pin connected with PE tool now, we can reflash our custom project(MCAL implemented) with no problem. However, even with the reset pin connected we cannot reflash the MCUs that are locked before. So we are trying to find a way to unlock them. 

 

Thanks,

 

Tony

 

0 Kudos
Reply

605 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @PangeoTony 

What is the state of the reset_b pin? Can you attach the debugger to running MCU without reset?

VaneB_2-1718398927505.png

What modifications did you make in the SW? Have you changed clocks, for example?

0 Kudos
Reply