cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F10X not being recognized as device

egaba88
Associate
Posted on July 10, 2010 at 19:16

STM32F10X not being recognized as device

8 REPLIES 8
hlbeaucage
Associate II
Posted on May 17, 2011 at 13:58

Hi i have the same problem!! i'm trying to figure it out right now! Sorry i don't have a direct response to that!! but have you tried out this prog

http://www.er-forum.de/obd-diag-dl/index.php?action=downloadfile&filename=STM-Progger.zip&directory=Soft%20f%FCr%20Programmiertools%20Controller%20etc.&;

Maybe it can help!!

Have you figure it out???

I'didn't have to install CDC fooor virtual port i think that it found my board (iNemo) right aaway and i can put it in DFU mode so i think that my bboot loader is working!! Can you put yours in dfu mode??

Hugo
Posted on May 17, 2011 at 13:58

Pretty much all the ST dev boards provide a COM port and a JTAG/SWD port.

If you foul up the board's firmware you can either push it completely through the serial port (USART1) or JTAG it in with say a J-Link+J-Flash

The serial/USART1 has a single window of operation, you set the BOOT0/1 pins correctly and you reset the board. You then have one chance for the PC serial flash program to connect with the board, as the ROM boot loader is looking for a specific data pattern on the serial line to auto-detect the baud rate. If the flash program does not recognize an STM32, you will have to reset the board and try again. Other than that the STM32's serial boot loader is pretty robust, and the protocol is well documented.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hlbeaucage
Associate II
Posted on May 17, 2011 at 13:58

I have many question about what you just told me

1. The jtag-J-Flash can't seem to see my flash on the iNemo board is that normal??

2. In order to run the uClinux on the boat do a really need to change the boot loader?? I think not?

3. Serial port ins't really working i don't know if its my circuit converter to computer that is meased up but i can upload program and bootloader by Jtag right?? Do you have a link for commands lines for Jlink and what jLink program i should use?

Thanks

Hugo

hlbeaucage
Associate II
Posted on May 17, 2011 at 13:58

I forgot to say that i'm trying to use uClinux on an iNemo board! Same processor but different componement!! Still has one UART port but on the plans the say it UART2?? weird!!

thanks

hlbeaucage
Associate II
Posted on May 17, 2011 at 13:58

I just look at the schematic and the USART1 on iNemo is not used!!! Only USART2 is used to communicate to the expansion serial connector!!

Is it possible to download a bootloader :tiny_kernel_bootloader that uses the USART2 port??

And how do you configure uClinux to make him use the USART2 as console debugg!!

thanks

Posted on May 17, 2011 at 13:58

No it is not normal for a J-Link to not be able to identify the STM32 and flash memories inside it. It does of course have to be a model of J-Link that supports Cortex-M3 & SWD.

The separate J-Flash program should be able to see the STM32 and the internal flash, it also has support for external NAND/NOR flash memories. J-Flash must be licensed to function. This might be problematic if you have a bootleg/clone.

http://www.segger.com/cms/jflash.html

Segger has drivers and documentation online for the J-Link. The jlink.exe file also has a command line interface, again documented, to access the device, erase it. At startup it should also identify the STM32 and the connectivity it has.

It is possible to use the JTAG to download, flash and run code. JTAG tools can download and run code in RAM permitting total control of all aspects of the STM32 functionality, and devices attached to it.

C:\Keil4\ARM\Segger>jlink

SEGGER J-Link Commander V4.15n ('?' for help)

Compiled Jun 18 2010 19:55:30

DLL version V4.15n, compiled Jun 18 2010 19:55:09

Firmware: J-Link compiled Jul 30 2008 11:24:37 ARM Rev.5

Hardware: V5.30

S/N : 1000xxxx

OEM : IARKS

Info: TotalIRLen = 9, IRPrint = 0x0011

VTarget = 3.229V

Info: Found Cortex-M3 r1p1, Little endian.

Info: TPIU fitted.

Info:   FPUnit: 6 code (BP) slots and 2 literal slots

Found 2 JTAG devices, Total IRLen = 9:

 #0 Id: 0x3BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)

 #1 Id: 0x16410041, IRLen: 05, IRPrint: 0x1, STM32 Boundary Scan

Cortex-M3 identified.

JTAG speed: 100 kHz

J-Link>mem8 1ffff000 40

1FFFF000 = FC 01 00 20 21 F0 FF 1F 65 F7 FF 1F 67 F7 FF 1F

1FFFF010 = DF F8 04 D0 00 F0 AA FB FC 01 00 20 00 47 00 00

1FFFF020 = 00 48 00 47 11 F0 FF 1F FF 49 A1 F8 04 08 B1 F8

1FFFF030 = 00 08 40 06 FB D5 70 47 FD 49 FC 48 08 60 70 47

J-Link>mem8 08000000 40

08000000 = E8 04 00 20 F9 01 00 08 4D 04 00 08 4F 04 00 08

08000010 = 51 04 00 08 53 04 00 08 55 04 00 08 00 00 00 00

08000020 = 00 00 00 00 00 00 00 00 00 00 00 00 59 04 00 08

08000030 = 57 04 00 08 00 00 00 00 5B 04 00 08 5D 04 00 08

J-Link>

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hlbeaucage
Associate II
Posted on May 17, 2011 at 13:58

Thanks

I was able to see what was in the flash memory with J-MEM....J-Flash can't detect my flash on my iNemo board!! Maybe normal since the is no physical flash on the board and there is 512Kbytes in the STM32F103REST7!!  Maybe the jLink-edu is the problem!! The important is that i can see whats in my memory

For bootloader

I need to program a bootloader by jtag since i know it possible!! I have the tiny_kernel_bootloader.hex is there an easy way to program it to the board via j-link jtag command lines??

For uClinux

i was wondering were can i change the USART1 for USART2 for the serial console since on the iNemo there is no USART1!!!

thanks

Posted on May 17, 2011 at 13:58

For bootloader

 

I need to program a bootloader by jtag since i know it possible!! I have the tiny_kernel_bootloader.hex is there an easy way to program it to the board via j-link jtag command lines??

 

The easy way is to use the right tools. If I was trying to make my life more complicated, I'd either use Keil uVision 4 to download and flash the code I wanted in the chip, or write a small RAM based hex loader that runs over USART2 and use jlink.exe with a loadbin/setpc/g  sequence to load and run it. The J-Link I'm using came with a STR912 so it isn't Cortex-M3 aware, otherwise J-Flash would probably work, but it doesn't so I can't demonstrate that. Most of my available JTAG pods are U-Link's. The other possibility is an ST-LINK, the supplied utilities support reading/writing the STM32 flash simply and easily.

That said I don't have an iNemo board to test on either, there might be an easier way, but you've indicated the USB method isn't working.

Interestingly the latest J-Link software download (v4.20h) has a JLinkFlashSTMB525.exe for the STM3210B board, perhaps future releases will have software for the iNemo
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..