Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
February 22, 2007 - 9:03pm
|
Is it possible to interface with Rlink programmer's DLLs? I can program a ST7 uC by calling the ST7_pgm EXE, but I always get a successful status int (0). A 0 is returned even if I have the Rlink disconnected from the uC. I need some way of knowing the uC was or was not programmed. It would be good to integrate some of the DLLs into a custom application to check for this. Do you have any documents showing how to do this for C++ or .NET? |
Hi,
No, it's not possible to interface with our DLLs, and we don't want to make it possible. But we can and will make ST7_pgm return an error code. Actually, it should do it already. I'll check why it doesn't and correct that.
Best Regards,
Vincent
Hi,
I tried it here with the latest version and it works fine.
Please tell me the Build Number of the RIDE you are using. You can see it by clicking "help"->"About" in RIDE.
Are you sure that your procedure for getting the returned code is correct? I've done it with Visual C++ and found that it's not really straightforward.
For testing the executable, I wrote a batch file that calls it and displays the error code. Please try to copy the code below in a batch file and then execute it with RLink connected and then without it, and tell me what you see.
st7_pgm ST7Lite39 I
echo %errorlevel%
Best Regards,
Vincent
I could have called the wrong function before. If the RLink is not connected I receive a 0x304. If RLink is connected but module is not powered I receive a 0x303. I have seen a 0x102 returned, as well. Do you have a list of error messages/codes for the RLink.
Thanks
Hi,
First, please note that there is no bijective relation between the error codes and the error message. The same error code can come with several different messages, and the same message could come with several different error codes.
The error code gives information on the type and source of error. The message gives some additional information.
The executable outputs the error message on its stdout stream. You should redirect it to your application and format it for displaying as you wish.
The error code consists in two bytes, for the type and source of the error. Below are the definitions. As you can see, 0x304 means "fatal communication error", and 0x303 means "recoverable communication error". But these are quite vague, so you really need to take the error message from the stdout...
Warm Regards,
Vincent
Have a good day.
I can write with ST7_pgm.
Is it possible to read the MCU.
Thanks.
Hi,
No, you cannot read the flash using st7_pgm.
You have to use RFlasher for that.
Best Regards,
Vincent
Have a good day.
I have used ST7_pgm in c++.
Is RFlasher a program which gets command from command line and exits with a code.
Thanks
Hi,
No. RFlasher is a GUI, and there is no way to read the flash with a command-line executable for now.
Maybe we'll do that later, but I cannot tell when.
Best Regards,
Vincent
Have a good day.
in command line
st7_pgm st7liteus 2.hex no problem
st7_pgm st7liteus 2.hex 0xF023 F Error102 No Response from the DTC
What must i do?
Thanks.
continues from the above message
st7_pgm st7liteus 2.hex 0xF023 F there is error102 but inside configuration as i want.
Is there anyway to read 0 instead of 102.
Hi,
I get the same error when I use REva powered from the RLink. In this situation, VCC is only 3.73V, which is probably low enough to trigger the LVD. If I use a 9V external power on the jack connector, then I have a VCC of 5.13V and I don't have the error anymore.
So it seems to me that you are using a power that is too low, and this triggers the LVD. (you program 0xF023 in the option bytes, which activates the LVD)
Can you please measure the VCC on your board?
Are you using the REva?
If yes, how do you power it?
Do you have the possibility to use a higher VCC?
Best Regards,
Vincent
Have a good day,
i use RLink Primer ST7Ultralite and Vcc is nearly 4.5V because of serial diode and USBVcc is 4.8V.
I use an other same MCU with an other PCB.I cancelled the MCU on the RLink Primer board.The values doesnt change when i plug the MCU.The results are the same.
Thanks.
Hi,
Sorry, but the RLink in the Primer is not supposed to be used with anything else than the ST7Ultralite that is in the Primer.
We don't expect it to work in the configuration you are using, and of course we don't give any support for it.
Best Regards,
Vincent
Thanks again.