We’re trying to finish up the last bits and pieces of our BSP. And of course, we’ve run into another strange problem.
Background: We've got a custom board with an iMX53 on it. We're started with a WEC7 BSP from Adeneo and have most everything
working. We are using the iim driver from the BSP from Freescale/Adeneo. We have written a program that takes the address and the value as command line parameters and then loads the driver and programs the fuses, and then displays all of the fuses in bank 0 and 1. The Reference Manual (with addendum) talks about the fuse box, iim, and the in the addendum lists the fuse information.
Problem: We are trying to program some fuses, but they don't stay programmed after a re-boot. We've verified that they do get programmed, and are programmed by reading the fuses.
What we've tried:
Questions:
Thanks,
Peter
First, VDD_FUSE [3.0 – 3.3 V] must be applied for burning.
As for i.MX53 fuse burning two solutions may be recommended.
1. MFG tool.
The following Community thread contains files for the MFG tool.
https://community.freescale.com/message/254185#254185
2. U-boot.
Note, U-boot may be loaded by the MFG tool.
You may use U-boot to work with the fuses, assuming VDD_FUSE is
proper for writing. Below is IIM command help of U-boot.
MX53-LOCO U-Boot > help iim
iim - IIM sub system
Usage:
iim Warning: all numbers in parameter are in hex format!
iim read <bank> <row> - Read some fuses
iim read fecmac - Read FEC Mac address
iim blow <bank> <row> <value> - Blow some fuses
iim blow fecmac <0x##:0x##:0x##:0x##:0x##:0x##>- Blow FEC Mac address MX53-LOCO
U-Boot >
It sounds like a lot of work to either get UBoot or the MFG test working on my custom board. I would rather not start another development effort to do the simple job of programming the fuses. What I would like to use is the driver provided in the ARD BSP and referred to in the WCE700_MX53_ER_1105_ARD_ReferenceManual.pdf chapter 18 to blow the fuses. [1]
I've looked at both at the ARD code and the UBoot code and they are similar. I just don't know
why the ARD IIM Driver is not working for me. I know that I need to provide 3.3V to VDD_FUSE. I also know that I need to make sure that the EFUSE_PROG_SUPPLY_GATE bit of the CGPR register is set.
There is a cryptic message in the MX53QSB schematic, p111 that says:
"Note: If the internal chip regulators for PLL circuits are not used, R12 should be 1K Ohm to limit current to VDD_FUSE. If the internal chip regulators are supplied by VDD_REG_2V5, R12 should be 0 Ohm."
Which leaves me wondering if I need a resistor or not. Our board started with the QSB design and so has the two internal LDO's powered up, but I don't believe that we're using either one to power something else.
There is also a reference in the IIM chapter of the iMX53RM that alludes to "supervisor mode" (p 1843) it says:
"All IIM registers can be accessed in user mode except FCTL, which controls programming functions and can be accessed in supervisor mode only."
If I search the rest of the reference manual for "supervisor mode", I find a few references throughout the manual but nothing that says how to get into supervisor mode. The only hint is on page 956 section 20.3.1 Peripheral Access Policy.
A. So how would I tell if I'm in supervisor mode?
B. How would I get into supervisor mode?
<edit>
Looking in the DDI0406C_armv7-AR-_architecture_reference_manual, and the documentation about the CSPR register, the last 5 bits are the mode bits. Using a KITL connection, I've verified that in the driver code, the mode is system mode (0x1F) and that in my application it is user mode (0x10). So it's not in supervisor mode (0x13), but does have the same privilege level. (Sorry, I sleep with the MX53RM under my pillow and sometimes forget that there is other documentation. <grin>)
So the answer to the above questions:
A. You know which mode you are in by looking at the CSPR register, bits 4:0.
B. WEC7 is taking you into and out of system mode, so it's probably somewhere in the private code.
</edit>
I guess the real question is what are the steps that I need to take both on my board and with the iim driver to program/blow/set the fuses?
I think it would include:
1 - Make sure that VDD_FUSE is at 3-3.3V
2 - Enable fuse programming by setting the EFUSE_PROG_SUPPLY_GATE bit.
3 - Make sure that the clock to the IIM is enabled, CCM_CCGR0[31:30).
4 - For reading follow the reading instructions in the IIM chapter.
5 - For writing follow the writing instructions in the IIM chapter.
What else am I missing?