We are facing hard fault exception after PMIC, I2c and Dio Integration in Bootloader, included Mcu clock ref also.
Following are the screenshots of the hard fault:
So far we found that ModeConfigPtr is not updating the correct address and we updated it manually during debug. Even after that we see it is going hard fault as seen below:
Configuration parameters:
Hello @Anup97,
As I mentioned before, we do not recommend including the PMIC driver into the bootloader, therefore we don't have examples or guide on how to do it.
I can recommend you checking the Bootloader User Manual available in the GoldVIP package that you can find in the AUTO-SW-PACKAGE-MANAGER
you can find this document after installing the package in the documentation folder. If you are not able to download the package please contact your FAE/DFAE/NXP representative so they can guide you on how to enable it.
In this document you can will see information on how to customize the bootloader.
We are able to load the bootloader image and from bootloader initialization it is going to exception. As shared in below screenshots:
Do you have any reference, where Pmic is integrated in the bootloader ?
Hello @Anup97,
Being that it is a custom HW I may not be able to give you full support. With that said, I do not recommend putting this modules in the bootloader, since the expected behavior is that the bootloader does the minimum just to boot the needed cores and then give control to said cores. Also the bootROM has a timeout to load the Bootloader image, if the image is too big it will cause the board to reset, as you can see in the reference manual [page 1348, S32G3 Reference Manual, Rev. 4, 02/2024]:
Can you check if this timeout is being respected?
Another thing I can recommend is checking the clock an power configurations of the problematic modules. I2C uses either DMA or interrupts to manage the flow of information, this modules might not be completely configured when the bootloader is traying to send/receive messages.
I am assuming that if you are using this modules in your application then the hardware can be discarded as a problem.
In this case, mi general recommendation is to create the smallest and simplest bootloader so it can be loaded and executed in the fastest way possible, so that the M7 application can refresh the PMIC watchdog before the PMIC timeout.
Let me know if this information was useful.
Hello @alejandro_e ,
Hello @Anup97,
To be able to help you I will need some details about your setup:
Thanks in advance for the information