HI :
How can i config a tamper pin to a gpio ? for example , how to config IOMUXC_SW_CTL_PAD_SNVS_TAMPER0 to gpio5_0.
refer to the document of mx6ul IMX6ULSRM.pdf , I know that , it has to config TAMPER_PIN_DISABLE[1:0]., which is found in
chapter 5 "Fusemap": 0x430[21:20]. but how to access it ?
Could anyone please give me a hand ? I'm confuse about it for sometimes .
Solved! Go to Solution.
Hello,
You may use U-boot to read / write (once) fuses.
For example, u-boot command to read TAMPER_PIN_DISABLE is
=> fuse read 0 3
Definition of TAMPER_PIN_DISABLE[1:0] are as following :
00 - enabled, TAMPER0-9 used as TAMPER detection pins.
01 - disabled TAMPER2-4 and TAMPER7-9 used as GPIO.
10 - disabled TAMPER0-1 and TAMPER5-6 used as GPIO.
11 - disabled TAMPER0-9 used as GPIO.
So, for the mentioned U-boot command, If bit [21:20] is 11, then all the ten
tamper pins are programmed to GPIO mode.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello,
You may use U-boot to read / write (once) fuses.
For example, u-boot command to read TAMPER_PIN_DISABLE is
=> fuse read 0 3
Definition of TAMPER_PIN_DISABLE[1:0] are as following :
00 - enabled, TAMPER0-9 used as TAMPER detection pins.
01 - disabled TAMPER2-4 and TAMPER7-9 used as GPIO.
10 - disabled TAMPER0-1 and TAMPER5-6 used as GPIO.
11 - disabled TAMPER0-9 used as GPIO.
So, for the mentioned U-boot command, If bit [21:20] is 11, then all the ten
tamper pins are programmed to GPIO mode.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Yuri,
I'm having trouble getting this to work.
Bits 20-21 are set to 11 on my system:
=> fuse read 0 3
Reading bank 0:
Word 0x00000003: 7031006e
But I'm unable to change SNVS_TAMPER1 to alt 5 (GPIO) using register IOMUXC_SW_MUX_CTL_PAD_SNVS_TAMPER5:
=> mm 020e0020
020e0020: 00000010 ? 15
020e0024: 00000000 ? -
020e0020: 00000010 ? =>
I'm running on an i.MX6UL, rev 1.1:
CPU: Freescale i.MX6UL rev1.1 528 MHz (running at 396 MHz)
CPU: Automotive temperature grade (-40C to 125C) at 36C
Hello,
How do you set the value of Bits 20-21.Can you tell me your command?
And how do you know TAMPER_PIN_DISABLE is Bank 0 Word 3?
which document descript the register?
Thanks.
Hi Zhu,
The TAMPER_PIN_DISABLE field is found in the reference manual on page 214 (Table 5-9), though you can't search for it directly because of word wrap.
Search instead for "TAMPER_PIN_DIS".
Is it the "35.5.14 Value of OTP Bank0 Word3 (Configuration and Manufacturing Info.) (OCOTP_CFG2)"?
I can't set its value use uboot command:
=> mw 0x21bc430 0x0030002f
=> fuse read 0 3
Reading bank 0:
Word 0x00000003: 0000002f
=> md 0x21bc430
021bc430: 0000002f /...
=>
I don't know how to change its value.
Can you help me?
Hi Zhu,
I don't think anyone wants to say (myself included), because you can brick a device, but the command to write fuses is "fuse prog", and to set those bits, you might do this:
=> fuse prog 0 3 0x0030002f
Hi Eric,
Thanks very much.
Unfortunately, I'm using G3, I can't use tamper pin as nomal GPIO.
and may you explain "tamper gpio" for me?
What does it mean?
Thanks.
Hi Zhu,
Sorry, but I'll have to refer to others for the explanation of tamper gpio.
做工业级应用,一般会选择G2版本,如果使用了G3版本,则其以下GPIO只能做tamper GPIO,不能做普通的GPIO:
CTL_PAD_SNVS_TAMPER0~CTL_PAD_SNVS_TAMPER9 10个GPIO。
可以通过烧写掉以下fuse来将其设置为一般的GPIO:
G3 version CPU is for POS machine design, not as the G2 for industry, which the follow fuse is 00 and need you burn it to 11 to enable tamper0-9 to normal gpio, Pls check your reference manual
TAMPER gpio 是Pos机上用的,检测攻击,数据会自毁。
Hello,
"If TAMPER_PIN_DISABLE[1:0] fuse is programmed to "11 - disabled TAMPER0-9 used as GPIO",
then the tamper pins are in gpio mode, you do not need to configure iomux."
Regards,
Yuri.
Thanks Yuri
Hmmm. The pin is acting like a GPIO even though a read-back of the mux register doesn't show ALT5.
Thank you very much