Hello,
We bought a RD9Z1-638-4Li to begin testing the functionality of the MM9Z1_638 chip. We are using a PE Micro Multilink Universal to program/debug.
I wanted to create a small "hello world" program by toggling PTA7:
PTA_PTA7 = ~PTA_PTA7;
I took pieces of code from the reference design code to try and get this program built quickly. Here is the relevant parts of the program:
#pragma c99 on
#include <stdio.h>
#include "derivative.h" /* include peripheral declarations */
#define EVER (;;)
#define DO_NOTHING {;}
/* FUNCTIONS FROM REFERENCE DESIGN CODE */
void SYS_Init(void);
void CPMUStartup(void);
void D2DInit(char);
/* END FUNCTIONS FROM REF DES CODE */
int main(void) {
SYS_Init();
CPMUStartup();
D2DInit(1);
DDRA = 0b10000000; // PA7 output
while(1){
__RESET_WATCHDOG(); /* feeds the dog */
PTA_PTA7 = ~PTA_PTA7;
}
return 0;
}
After main() I have the function definitions for SYS_Init, CPMUStartup, and D2DInit, all pulled from the reference code.
THEN, I used the PE Micro to program the first time. PTA7 was not toggling, so I tried messing with other registers, and reprogramming. THIS time, the PE Micro could not detect the processor!
First I see "Device is secure. Erase to unsecure?" I hit yes.
Then I see the Power Cycle Dialog, saying "Target MCU is not responding." It asks to toggle power to get the debugger to see the chip. I follow orders and hit OK.
Then I see the "Erase to unsecure?" message again. I hit yes.
Then the P&E Connection Assistant comes up. Retry, still cannot connect to the chip.
Things I've tried/observed:
* Change BDM frequency and delay, none of that changes behavior.
* The Reset pin on the BDM1 header is toggling. It goes low for 45 usec, 330 msec high. Does this mean the chip is in some sort of pseudo-stop mode? This happens without the PE Micro connected.
* Updated PE Micro drivers.
* Went to a new PC, setup the environment, wrote another program, and tried "downloading" to the chip again. Still can't connect.
How can I get back to being able to download to the chip, and how can I prevent this lockout from happening again?
Thanks in advance for any help!
Hi Daniel,
please see this thread:
Either you should disconnect RESET_A line from RESET during programming, or disable analog watchdog.
Hope it helps.
Regards,
iggi
Hi iggi,
I'm working with Daniel on this project. I tried the following and was unable to connect to the MM9Z1J638 with the PEmicro:
What would you recommend trying?
Thanks,
Karen
Hi Karen,
The most probably the device is secured. Did you try PEMicro's Unsecure12 tool?
I hope the device is not damaged. Check if it's getting hot.
I doubt the problem is related to PE's Multilink Universal programmer. Unfortunately, don't have that RD board on my desk to test it :-(
Regards,
iggi