cancel
Showing results for 
Search instead for 
Did you mean: 

Error Target MCU stm32f401cd

yassir
Associate III

Salut la communauté,

J'ai créé une carte électronique permettant de visualiser l'état de la batterie d'un ULM. J'ai utilisé le microcontrôleur STM32F401CD, et j'avais initialement prévu d'utiliser uniquement l'horloge interne HSI du MCU, donc je n'ai pas ajouté d'horloge externe. En voulant programmer ma carte, j'ai remarqué que je parviens à effectuer une mise à jour sur mon STM32 Link/v2, mais je n'arrive pas à cibler mon MCU en SWD (qui est correctement alimenté en 3.3V, comme mesuré). Je voulais donc savoir si le problème pourrait venir du HSI.

Merci beaucoup.

44 REPLIES 44

Hello, i have a new version of my Shematic for my project, can you give me some feedbacks please ? 

Yassir

Hello,

I'm not very comfortable with this part: PB3 connected to +BATT (12V?) via a resistor bridge 1k/100k!

In my opinion there will be a risk of important current injection and voltage exceeding VIO input max!

SofLit_0-1715002034429.png

Did you make the calculation on that point (V_YES/NO_Charge)?

@Andrew Neil  what do you think?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

Me too, i didn't notice this, it's a mistake. I think 20k/100k would be better (+BATTmax = 15V).

What do you think ? 

In my opinion need to find a solution to isolate the battery voltage from the MCU. May be by using optocoupler?

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

I want to charge my battery with my alternator, so they need to be on the same potentiel. And i want to pilot the charge with my MCU ("Autorisation charge" + Contacte charge batterie").

Do you think that i can isolate the battery voltage from the MCU ?

In my opinion you need to isolate your MCU from the alternator/battery circuitry ..

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.

So i must have to use VDD and not +batt ? 

 

Hi, do you think that if i add a Zener it will be enough to protect the MCU here ? 

yassir_0-1715072418198.png

 

You need to give more details - remember that we know nothing about your project!

 


@yassir wrote:

I want to charge my battery with my alternator


What battery? What alternator?

Is this a  car?

If so,  beware that automotive electronics can be a very hostile environment!

 

@yassir wrote:

+BATTmax = 15V 


That might be the highest nominal voltage, but spikes & glitches can cause much higher transients than that -, eg, do a search for "load dump" ...

As a first-year engineering student on an apprenticeship in a design office specialized in lithium batteries, I'm still developing the reflexes needed to assess the solutions for the circuit board I'm currently working on. This board aims to protect the battery system of ULMs (ultralight aircraft). To achieve this, it will need to balance the cells, and control the battery charge (15V) by operating power MOSFETs through my microcontroller. It will also need to isolate the battery charge from the alternator. Additionally, it will provide alerts for encountered issues through various visual and auditory signals (LEDs and a buzzer). That's the overall context; I hope this sheds some light.