On the ADuC7023, can you advise how to configure the part to use P0.0/0.1/0.2/0.3 as GPIO pins?
P0.0/P0.1/0.2/0.3 are GPIO pins that also may be configred as JTAG pins.
Firstly, as P0.0 controls the boot mode entry sequence along with flash address 0x80014, we would recommend not using this pin as a GPIO as your ADuC7023 may unexpectedly enter boot mode if this pin is tied low during a reset sequence. It may be used as a GPIO but, extreme caution is advised.
P0.1/0.2/0.3 pins default mode is set by the ADuC7023 kernel on exiting a reset sequence. If BM pin = 0, the kernel configures them as GPIO; If BM=1, the kernel configures them as JTAG pins. If you are programming or debugging the part via the JTAG interface, BM should be set to 1.
if you want to use P0.1/0.2/0.3 as GPIOs, we recommend the following:
1) Set BM=0. If BM=1, user code may still reconfigure the mode of these pins via the GP0CON register.
2) When using these pins as GPIO, JTAG access is not supported.
3) Ensure you can mass erase the flash in case something goes wrong in your development - pay attention to the contents of flash address 0x80014 and the BM pin level.
When BM=0, there are two boot mode after reset.
Case 1: 0x80014 equal to 0xFFFFFFFF, enable I2C download mode, should be same as other parts
Case 2: 0x80014 NOT equal to 0xFFFFFFFF, JTAG shared pins used as GPIO, I2C download mode is disabled
Please Pay more attention when use JTAG Pins as GPIO, in this case, JTAG doesn’t work( used as GPIO), and I2C download mode disabled(0x80014 NOT equal to 0xFFFFFFFF), the silicon will be not re-programmed.
so a function call to erase the flash page containing 0x80014 is requested for re-programming in code.
One project for JTAG pins used as GPIOs for ADuC7023 is created, IRQ1 Button used for Flash mass erase on Evaluation board, please check the attached file.
Retrieving data ...