# Babel tutorial problem

**URL:** <https://forum.zubax.com/t/babel-tutorial-problem/930>\
**Category:** Cyphal & DroneCAN\
**Created:** [April 17, 2018, 6:01pm UTC](https://forum.zubax.com/t/babel-tutorial-problem/930 "2018-04-17T18:01:54Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [April 17, 2018, 6:01pm UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/1 "2018-04-17T18:01:54Z")

</div>

Hello.

I am trying to UAVCAN tutorial below.  
[https://kb.zubax.com/display/MAINKB/2.+Subscriber+tutorial](https://kb.zubax.com/display/MAINKB/2.+Subscriber+tutorial)

But I don’t know how can Babel is flashed with source code. source code have an IAR project file, so how do I build it and get the resulting file.

I made \*.application.bin file to flash the Orel 20 through UAVCAN GUI Tool before. Like this, Is there any method to flash without using blackmagic probe? To do this I found a method to make binary file from EWARM. But I can’t sure of that. Is it right?

 ![image](https://forum.zubax.com/uploads/default/original/1X/fd66c9f53598ceedb47843c78f4b82cf554f1e4e.png)

Also can I use window OS to work with this all?

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [April 18, 2018, 7:20pm UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/2 "2018-04-18T19:20:36Z")

</div>

Greetings!  
This project can be compiled in IAR v7.5 and later.

 ![image](https://forum.zubax.com/uploads/default/original/1X/99d0d551a423e04e2f875663d35c2afe10b03208.png)  
Unfortunatel IAR does not support DCP out of the box(but maybe there is a way to use it), so I had to flash babel with ordinar st-link. I had to make an adapter from that tiny DCP connector to ordinar 0.1’’ pitch PLS, which I the connected with my ST-LINK(this is a quection of 10 minutes though).  
Anyway, I find it a bit tricky to use DCP in windows environment, so st-link is a good option.

You must also keep in mind that this project is just a demo, so feel free to copy bits of code to your IDE of choise, no need to use IAR only as it is definetly not free. Though, compiled project is under 16K of FLASH memory, so you can use free limited version of IAR to evaluate it. Find it [here](https://www.iar.com/iar-embedded-workbench/tools-for-arm/arm-cortex-m-edition/) at the bottom of the page

Best regards, Alex

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [April 23, 2018, 2:53am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/3 "2018-04-23T02:53:09Z")

</div>

Thanks Alex 😀  
I will try it.

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [June 11, 2018, 7:40am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/4 "2018-06-11T07:40:17Z")

</div>

hello.

I’m trying to make adapter. I want to check pin matching as follow. Is it okay?

 ![image](https://forum.zubax.com/uploads/default/original/1X/6f364f1798443c1830b318da8874fefe208803e8.png)

---

<div class="post-metadata">

**Author:** ![pavel-kirienko](https://forum.zubax.com/user_avatar/forum.zubax.com/pavel-kirienko/32/180_2.png) [@pavel-kirienko](https://forum.zubax.com/u/pavel-kirienko)\
**Post date:** [June 12, 2018, 3:19pm UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/5 "2018-06-12T15:19:15Z")

</div>

Looks good, except that I don’t think there is a UART interface in ST-Link, unless I’m hopelessly behind the times. Haven’t used ST-Link in ages.

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 2, 2018, 9:26am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/6 "2018-07-02T09:26:54Z")

</div>

I tried to download project file via st-link, but it failed.

Do I have to add debug port activation code in tutorial code?

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 2, 2018, 9:55am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/7 "2018-07-02T09:55:37Z")

</div>

As far as I know SWD interface is active after reset by default and you can only disable it in your program, so no, there is no need to add any code.  
Can you please describe a bit more detailed what were your actions? Did you use IAR?

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 2, 2018, 10:18am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/8 "2018-07-02T10:18:51Z")

</div>

I use IAR.  
I connected st-link and click download and debug button. After that a error popup window appears.  
it said “ST-Link, No MCU device found”

Does SWD interface is active after reset by default mean swInit() in tutorial code?

I linked st-link and babel to 3.3V. Is it ok?

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 2, 2018, 10:34am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/9 "2018-07-02T10:34:44Z")

</div>

Ir seems everything should work.  
Just for clarification:  
to start debug session you need only 4 connections: GND, 3v3, SWDIO, SWCLK.  
Are you sure BABEL is powered by st-link? Some programmers use VDD pin not to supply power, but to READ targer supply voltage to match logic levels.

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 2, 2018, 10:43am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/10 "2018-07-02T10:43:22Z")

</div>

BABEL is powered by VDD pin of st-link as you said.

Red and yellow light is shining on the BABEL when I try to download. Is it right?

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 2, 2018, 10:55am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/11 "2018-07-02T10:55:57Z")

</div>

Make sure you are powering BABEL with 3.3V  
Also please try to connect to the MCU using [STM32 ST-LINK Utility](https://www.st.com/en/development-tools/stsw-link004.html)  
This way we will figure out if the issue is with IAR or with wiring(or st-link)

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 3, 2018, 4:58am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/12 "2018-07-03T04:58:49Z")

</div>

I tried to connect to the MCU using STM32 ST-LINK Utility.  
And it doesn’t work. Same error appears.

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 3, 2018, 6:10am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/13 "2018-07-03T06:10:25Z")

</div>

Well, then the only thing you can do here is check the wiring again. By the way, can you share a photo of your setup?

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 3, 2018, 6:55am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/14 "2018-07-03T06:55:40Z")

</div>

Thank you for checking.

Here’s photo.

 ![KakaoTalk_20180703_154905765](https://forum.zubax.com/uploads/default/original/1X/f1445a2cd87d1a4daaaca5936f5308c861805f61.jpg)

==============  
BABEL | ST-link  
power | VDD 3.3V  
SWDIO | SWDIO  
SWDCLK | SWCLK  
GND | GND

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 3, 2018, 7:24am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/15 "2018-07-03T07:24:00Z")

</div>

Looks nice. Check couple mode things.  
Try to connect to MCU but power BABEL from USB instead of st-link  
Also your wires may be too long, it is sometimes an issue. Try slowing down SWD interface in STM32 ST-LINK Utility. Go to TARGER-\>SETTINGS and find it here

 ![image](https://forum.zubax.com/uploads/default/original/1X/95ce480f6e39e940ea38f7b1bbab4f4f028f422d.png)

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 6, 2018, 2:02pm UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/16 "2018-07-06T14:02:49Z")

</div>

It also failed in ST-LINK Utility.

Do you mean power BABEL from USB and connect other SWDIO, SWCLK pins from ST-LINK?  
VDD and GND pins are disconnected.

 ![KakaoTalk_20180706_232637986](https://forum.zubax.com/uploads/default/original/1X/884fbcf6f8cca6e5b6cd3f985d366c945041fd3e.jpg)

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 7, 2018, 7:23am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/17 "2018-07-07T07:23:32Z")

</div>

Yes, I meant just this. Power from usb and connecto only 3 pins (gns, swdio, swclk to ST-LINK).  
If this also fails - inspect the debugging connector. Maybe it is defective or soldered badly?

---

<div class="post-metadata">

**Author:** ![binns](https://forum.zubax.com/letter_avatar_proxy/v4/letter/b/57b2e6/32.png) [@binns](https://forum.zubax.com/u/binns)\
**Post date:** [July 7, 2018, 8:49am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/18 "2018-07-07T08:49:42Z")

</div>

I solved problem. Power from usb and connect only 3 pins (gnd, swdio, swclk to ST-LINK) as you said.  
And also connect VCC to ST-LINK not VDD. Then it works!  
Thanks!

---

<div class="post-metadata">

**Author:** ![alexander.sysoev](https://forum.zubax.com/letter_avatar_proxy/v4/letter/a/da6949/32.png) [@alexander.sysoev](https://forum.zubax.com/u/alexander.sysoev)\
**Post date:** [July 7, 2018, 10:19am UTC](https://forum.zubax.com/t/babel-tutorial-problem/930/19 "2018-07-07T10:19:14Z")

</div>

I am happy to hear this! Good luck
