Hello, after programming the clock of the chip C8051F412 to 49MHz I get the error message "Target fail to response"! So I'm not longer able to programm the chip. The programmer works well (I have it tested on a other target). The hardware was not changed, so it's only a software issue. **?? How can I now erase the flash ??** Flash tools does also not help. The code of dead looks so: int i = 0; PFE0CN &= ~0x20; FLSCL = 0x10; PFE0CN |= 0x20; OSCICN = 0x86; CLKMUL = 0x93; for (i = 0; i < 20; i++); // Wait 5us for initialization CLKMUL |= 0xC0; while ((CLKMUL & 0x20) == 0); CLKSEL = 0x02; --> It was generated by the Config tool!! Thanks Hansj�rg
Silabs C8051F412 --> Programming error after setting clock to 49MHz
Started by ●January 13, 2012
Reply by ●January 13, 20122012-01-13
On Fri, 13 Jan 2012 17:36:09 +0100, Hansjörg wrote:> Hello, > after programming the clock of the chip C8051F412 to 49MHz I get the > error message "Target fail to response"! So I'm not longer able to > programm the chip. > The programmer works well (I have it tested on a other target). The > hardware was not changed, so it's only a software issue. **?? How can I > now erase the flash ??** Flash tools does also not help. > > The code of dead looks so: > > int i = 0; > PFE0CN &= ~0x20; > FLSCL = 0x10; > PFE0CN |= 0x20; > OSCICN = 0x86; > CLKMUL = 0x93; > for (i = 0; i < 20; i++); // Wait 5us for initialization CLKMUL |= 0xC0; > while ((CLKMUL & 0x20) == 0); > CLKSEL = 0x02; > > --> It was generated by the Config tool!!Configuration tools are written by humans, who work for a department that the bean-counters in Corporate Accounting list as an "expense". So it is unwise to assume that configuration tools work as advertise, or for that matter, in a way that's helpful at all. RTFM, and do the job yourself. I have learned, after a couple of different painful experiences, to not fire up a Stellarus chip unless it has two things: (a), a button or jumper or something on a spare port that I can physically control, and (b) has code that runs VERY EARLY IN THE BOOT PROCESS that hangs on that button press until it is released. That way, when my code messes up JTAG somehow, I can recover without desoldering the chip. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
Reply by ●January 16, 20122012-01-16
Run the SiLabs flash programmer and push erase code space without pushing connect. You may have locked the flash somehow with a bad image file. I have seen all sorts of nutball behaviour with the SiLabs tools. I've never broken one yet. Mark DeArman On Fri, 13 Jan 2012 17:36:09 +0100, "Hansj�rg" <m26872@remove_this.access.uzh.ch> wrote:>Hello, >after programming the clock of the chip C8051F412 to 49MHz I get the error >message "Target fail to response"! So I'm not longer able to programm the >chip. >The programmer works well (I have it tested on a other target). The hardware >was not changed, so it's only a software issue. >**?? How can I now erase the flash ??** Flash tools does also not help. > >The code of dead looks so: > >int i = 0; >PFE0CN &= ~0x20; >FLSCL = 0x10; >PFE0CN |= 0x20; >OSCICN = 0x86; >CLKMUL = 0x93; >for (i = 0; i < 20; i++); // Wait 5us for initialization >CLKMUL |= 0xC0; >while ((CLKMUL & 0x20) == 0); >CLKSEL = 0x02; > >--> It was generated by the Config tool!! > >Thanks > >Hansj�rg >
Reply by ●January 16, 20122012-01-16
I found it!!! The ESR (impedance) of the capacitor on Pin 7 to Ground was to bad. I add a proper 1uF ceramic capacitor, and now it works. "Hansj�rg" <m26872@remove_this.access.uzh.ch> wrote in message news:jepmhm$c2$1@speranza.aioe.org...> Hello, > after programming the clock of the chip C8051F412 to 49MHz I get the error > message "Target fail to response"! So I'm not longer able to programm the > chip. > The programmer works well (I have it tested on a other target). The > hardware was not changed, so it's only a software issue. > **?? How can I now erase the flash ??** Flash tools does also not help. > > The code of dead looks so: > > int i = 0; > PFE0CN &= ~0x20; > FLSCL = 0x10; > PFE0CN |= 0x20; > OSCICN = 0x86; > CLKMUL = 0x93; > for (i = 0; i < 20; i++); // Wait 5us for initialization > CLKMUL |= 0xC0; > while ((CLKMUL & 0x20) == 0); > CLKSEL = 0x02; > > --> It was generated by the Config tool!! > > Thanks > > Hansj�rg > >