Topic : Enabling ADC on STM32 halts the processor

Forum : ARM

Original Post
Post Information Post
April 26, 2008 - 8:42pm
Guest

Hi.

Has anyone experienced the same phenomenon:

When the command "ADC_Cmd(ADC1, ENABLE)" is executed on a stm32 "STM32F101RBT6", i get the following error:

OPI Driver:
Lost communication with target.
Terminating debug session.

It happens every time, and I have also tried some of the examples from the st library.

If I run the command before enabling the clock (which of course is wrong), no error happens, but as soon the command is executed - when the adc is clocked - the debug process is stopped immediately.

When I use the "Peripherals: ADC1" window, and I change the "ADC_CR2" bit "ADON", the excact samt problem occures!

Can someone please help me?

//Martin

Replies
Post Information Post
+1
0
-1
May 9, 2008 - 12:16pm
Guest

Hi

We have fixed some problems concerning STM32F101 so may be you can try to download the folder you will find in the link below:
ftp://www.raisonance.com/temp/ST/temp_fix_080428_try1.zip
Then place the files that you will find in this folder into your corresponding C\Program Files\raisonance\Ride\Bin (it is better to make a bockup of those that already in this install folder )

Let us know if it helps.

Matloub

+1
0
-1
May 19, 2008 - 8:28pm
Guest

I have now tested the modified files.

First of all: The problem with the ADC was an unstable supply on the VDDA (Analog supply voltage).

And about the files: I do not know what to look for? I have no idea what you have changed. But the problem showing calling parameter values in a function, has not changed. They are still displayed uncorrectly.

BUT with the new files, the project manager misbehaves. It wont allow me to save new added files. If I add new files, they are in the project, but when I press "Save Project", the new added files are removed!

- So I have uninstalled the "buggy fix".

//Martin

+1
0
-1
May 20, 2008 - 10:06am
Raisonance Support Team

Hi,

This patch only corrects a problem in the programming. (which also happens before debugging) We thought it could be the source of your connection problem, but obviously it was not, because it was a power-related problem.

The files in the patch are not loaded by RIDE until you start a debug session or a programming. ()or open the advanced debug options. Therefore, I would be very surprised if it was affecting the project management in any way. Can you make a few more tests and check this again? If you confirm that, then please answer this form, as we need as much information as possible in order to reproduce and fix the problem:
http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2231

As Matloub told you in the other post, the problem of parameters displaying will be fixed in a future release of the kit. We cannot correct this with a simple patch.

Best Regards,

Vincent

+1
0
-1
May 20, 2008 - 4:52pm
Guest

I won't submit a bug, since I have found out what is wrong. I guess the IDE is not very great at telling you, that the project files are write protected.

When the file "[Project].rapp" is write protected - which is quite normal when using source control - you are not told, that the saving of the project was not performed properly...

//Martin