void EZPORTmode(){ // Drive RCON high MCF_QSPI_QWR = MCF_QSPI_QWR_CSIV; // RCON HIGH == active low KS_SleepTask (SELFTASK,(TICKS)500/CLKTICK); // Drive RSTI high fs_etpu_gpio_output_high(GPIO3_CHANNEL); KS_SleepTask (SELFTASK,(TICKS)500/CLKTICK); // Drive RCON high MCF_QSPI_QWR = MCF_QSPI_QWR_CSIV; // RCON HIGH == active low KS_SleepTask (SELFTASK,(TICKS)500/CLKTICK); // Drive RSTI low fs_etpu_gpio_output_low(GPIO3_CHANNEL); KS_SleepTask (SELFTASK,(TICKS)500/CLKTICK); // waiting until RSTOUT signal is low while ( SPIUartRead()&0x2 ) { KS_SleepTask (SELFTASK,(TICKS)50/CLKTICK); } // Drive RCON low MCF_QSPI_QWR = 0; // RCON LOW == active high // RCON must be low before RSTI goes high... KS_SleepTask (SELFTASK,(TICKS)1000/CLKTICK); // Drive RSTI high fs_etpu_gpio_output_high(GPIO3_CHANNEL); // waiting until RSTOUT signal is high while ( SPIUartRead()&0x2 == 0 ) { KS_SleepTask (SELFTASK,(TICKS)50/CLKTICK); } KS_SleepTask (SELFTASK,(TICKS)200/CLKTICK); // at this point, board should be in EzPort mode // Drive RCON high again MCF_QSPI_QWR = MCF_QSPI_QWR_CSIV; // RCON HIGH == active low return;}
Rich T wrote:I assume when you have a pull-up, you see none of the "blips" during the command transfer, which seem to me to be 200-250ns each.
On the board we have an LED for reset and then some LEDs for various outputs. When reset is enabled, the all LEDs illuminate. When reset is disabled, whatever program is on the flash begins to run (blinking the output LEDs in my case).
Rich T wrote:How can you detect you are in EzPort mode? (I was not aware this was possible, but have wanted to do it more than once!)
Yes, when I send the reset command I expect the device to reset and come out of EzPort mode.
With power applied from the external power supply and regulated down to 3.3 volts for the microprocessor, the board can be placed into EZport mode but I can't read the status...
I have found that if I get it into EzPort mode then REMOVE the external power supply (J1 on schematic), I can successfully read the status.
With the external power removed, the only connection to the board is the "EzPort header" (J27 on schematic) from the master board.
From J27, the source of power is on the I/O pin RSTI that is fed from the master board.
The power on the slave micro's power pin is 2.46 volts, which is bleeding to the rails from the I/O pin.
So somehow RSTI can partially power the device and allow the EzPort status to be read successfully... I'm not sure what that means though =\
http://www.freescale.com/files/32bit/doc/data_sheet/MCF52211.pdf