Forum : ARM
Original Post
Post Information | Post |
---|---|
June 27, 2011 - 12:49pm
|
Hallo I am trying to conntect to an STM32L-Discovery board via RLink. For this reason, I disconnected the ST-Link part on the board and wired the SWD signals (SWCLK, SWDIO, JNRTS, JTDO, JTDI, and power) to the RLink. This allows to connect to the controller (i.e. I can read out the IDCode and the Silicon revision) but programming and debugging does not work. Within Ride7, I get an 'OPI Driver Error (ARM)' stating that there was a 'Timeout error when synchronising with plugin after launching it'. So my questions are: - are there any known issues with this configuration? I very appreciate your help. |
Hi,
This could be due to using an old version of the software. (Ride7 and/or RKit-ARM) Please update the software and see if the problem still appears.
We never tried using the RLink on a Discovery, but we did try it on the STM32L ST-EVAL board, which also includes a ST-Link. Seeing the error messages, I would suspect some interference on the reset signal.
Please make sure that there are no other components on the board that could interfere on the RST signal.
Please also confirm that you connected the CPU reset signal (=RST=NRST) from RLink to STM32.
This is _different_ from the JTAG reset signal. (=TRST=NTRST=JTRST=JNTRST)
Make sure you did not connect the RST of the STM32L to the TRST of the RLink.
Make sure the RST of the STM32L is not connected to its TRST.
The connection from the STM32 TRST to the RLink TRST is optional, but you must make sure that no other component (ST-Link, STM32 or other) interferes on it.
I hope it helps.
Best Regards,
Vincent
Hi
Thanks for the very fast response and your answer. I am using :
Ride7 Version 7.32.11.0112
Rkit-ARM Version 1.32.11.0116
I checked the wiring once more and the connection (basing on the JTAG-SWD adapter) is as follows:
JTAG : STM32L152RBT6 :
TDI (pin 5) JTDI PA15
TMS (pin 7) JTMS-SWDAT PA13
TCK (pin 9) JTCK-SWCLK PA14
RST (pin 15) Reset NRTS
GND/VCC GND/VCC
Are there any other options for debugging this issue?
Many thanks and best regards
Kilian
Hi,
Did you check for interferences on RST signal? Are there other components conected to it? Or to TRST?
It would be interesting to give a try at the RLink on another Cortex board, (STM32F, LM3S, etc.) if you have one. Just to see if the problem is related to the board, or maybe if there is something burned in your RLink...
Did you completely uninstall the software before installing the latest versions?
Otherwise some old files could cause problems, but that would be surprising...
We will try to find a discovery and make the test here... but that could take a few days.
Can you describe more precisely how you disconnected the ST-Link and how you conencted the RLink? (with a picture maybe?)
Is the clock still sent to the STM32L? (that should not cause these kind of problems, but it's interesting to know...)
Best Regards,
Vincent
Hi Vincent
Thanks for your efforts, which I very appreciate. Regarding your suggestions:
1) Checked the RST signal with an oscilloscope - looks fine, i.e. no spurious spikes.
2) Yes, the RLink works fine with other boards, as e.g. STM32F eval boards and with a number of proprietary boards basing on STM32F devices.
3) Yes, the SW has been uninstalled and then installed from scratch.
4) Disconnection is established by removing the jumpers for ST-Link (CN3) and by opening the relevant soldering bridges (e.g. SB100, SB101, SB9, SB13, SB5). RLink is connected by direct wiring to the PAx pins and the NRTS pin at the pin-headers.
5) The high speed crystal is not populated on the board as the internal oscillator is used. A 32kHz crystal is connected to the OSC32 pins.
Best regards
Kilian
Hi,
Thank you for the detailed reporting.
We indeed found a bug in our software, that prevents the RLink from programming the STM32L if it has no external clock (crystal) as is the case on the discovery.
I saw on the STM32L-Eval board that it works fine with the crystal but if I remiove it I observe exactly the error that you describe.
We will correct this as soon as possible and send you a patch. But it will take a few days. (hope we manage to solve it before my vacations at the end of the week ;) )
In the meantime I suggest you solder a crystal on your Discovery. There is a footprint ready for that. The ST Eval board has 8MHz, I suggest you use this value or the closest available to you.
If you don't have crystals at hand, probably you could also use the crystal of the ST-Link, which is also 8MHz, by simply soldering a wire from the STM32F103's OSCOUT to the STM32L's OSCIN. (Or you can remove the ST-Link's crystal and solder it on the Discovery part, but that will definitely break the ST-Link)
Please tell us if the problem is solved by this workaround. Otherwise it measn that there is another problem and we need to modify our Discovery as you did...
Best Regards,
Vincent
Hi Vincent
Thanks a lot - I will try with a 8MHz crystal as soon as I get the Rkit ARM running again. Unfortunately, the key I got when I updated to the newest version some time ago proved to be a demo key only. I will keep informed.
Regards
Kilian
Hi,
It seems that it was easy to correct.
I will send you by email the draft of the patch to validate before we make it public, and also some information about your registration.
Best Regards,
Vincent