Forum : ST7/STM8
Post Information | Post |
---|---|
October 7, 2008 - 10:06pm
|
Hi everyone, I have just received my STX-Rlink and have build a proto board for programming my FOXF1 microcontroller. But as I am new to ST7 micro and Ride development tools, I guess I am doing something wrong because every time I try to connect to my target microcontroller I am getting a message" Error resetting in ICC mode: No response from the device" HE-10Pin Microcontroller Pin Signal I am powering the target ST7FOXF1 from an external regulated PSU. Firstly i didn't connect the CLKIN and was keeping the setting ignore option bytes checked but found the above error message, then I unchecked the textbox for ignoring option bytes but again the same message. Then I did the connection for CLKIN and put a jumper on the daughter board to give clock(I guess that was required) but again got the same error irrespective of whether the textbox for ignoring option bytes is checked or unchecked. Please advice on how to solve this problem and move ahead as I have to deliver my project in the next one week. Rgds, |
Hi,
Your connections look fine to me.
Have you placed a capacitor between GND and VCC next to the CPU? I think you need one.
Have you placed a capacitor on RESET? You can put one but it should not be too large.
Is there a crystal on your board? If there is one, then you should not connect CLKIN from RLink, as you only need one clock, and some problems can appear if there are two clocks. (electrical conflicts, etc.)
Are there any components other than the RLink and the CPU on the ICCDATA, ICCCLK, RESET and CLKIN signals? (passive or active) If yes, try to remove them on one of your prototypes and see if it makes a difference.
If these hints do not solve your problem, we will need more information for helping you. (schematic of the board, version of the software, etc.) Please answer the questions in this form and post them here or send them to 'support@raisonance.com':
http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2231
Best Regards,
Vincent
Well, in fact I'm not so sure about the connections. The signals on RLink are fine, but on the ST7 it seems wrong. I didn't check that the first time...
If it's the 20-pin package, then ICCDATA should be on pin 18 and ICCCLK on pin 19:
http://www.st.com/stonline/products/literature/ds/14013/st7foxf1.pdf
(I assume that it's the 20-pin because for the other packages, you'd be using the wrong pins for GND and VCC ;/ )
It looks like you confused I2CDATA/I2CCLK for ICCDATA/ICCCLK. (you wouldn't be the first to make this mistake)
Best Regards,
Vincent
Hi Vincent,
Sorry for not being able to reply back as I was traveling.
Thanks for your advice, I had messed up with the ICC and I2C pins. My programmer is able to identify a device but now I need some more serious help from you.
As I am new to ST7 environment, I am really confused as to how the PC behaves in this family. My preferred language for programming is assembly as it gives me much better control of the device than C. Till now I have worked on PIC and 8051 based micro's. What I have understood about ST7 architecture is that the PC at reset points to memory address FFFE and FFFF i.e. the reset vector resides at these places and my memory starts at F000 in a 4KB device and (I guess obviously) the PC increases in every machine cycle. In this case I am not able to understand how does my PC jumps from FFFE-FFFF to the place where my reset code is placed? I have tried using the ORG directive but it is ( I think) only for locating code inside a particular segment and gives an error. I am also trying the following code, the idea behind it is to make the program jump to another place main where I can store the initializing code:-
STRT SEGMENT CODE AT 0FFFEH
aseg STRT
JP MAIN
MN SEGMENT CODE AT 0FFD0H
aseg MN
MAIN:
But this code gives an error ( no 117) saying ADDRESS SPACE OVERFLOWN.
I would request everyone to help me understand this thing. As I am relatively new to the programming domain and don't have anyone to guide me, pls advice.
Best regards,
Navneet
Hi,
In fact the PC is not initialized with 0xFFFE like you describe, but it is loaded with the data contained there.
So at Reset, you have
PC=(*((unsigned short *)(0xFFFE)));
and not
PC=0xFFFE;
And it is the same for the other interrupt vectors.
So you have to create, at address 0xFFE0->0xFFFF, a table containing the addresses of the ISRs.
(and not instructions that jump to the ISRs)
This is explained in the ST docs in more details.
In C it is done automatically using the 'interrupt' keyword. (and some special label for the reset)
If you want to write a program completely in assembler, you have to do it manually. For example like this:
This is an extract of file calc.st7, from the example located at
[RIDE_INSTALL_DIR]\examples\ST7\ASM\CALC\...
The example is designed for the ST72F521, so the IT vectors will not match your FOX, but you can use it as example for the syntax.
Best Regards,
Vincent