March 28, 2024, 11:19:03 PM

STM32-103 STK Development Board‏

Started by jack97, November 14, 2012, 03:12:35 PM

Previous topic - Next topic

jack97

does the STM32-103 STK Development Board‏  have 2x  successive approximation register adc does it come pre loaded with the usbaudio demo, what frequeny can I record my voice in windows with the demo 32khz

thanks.

LubOlimex

Hello Jack,

Best idea would be to check the datasheet of the processor about the ADC http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00161566.pdf. page 20 and the characteristics table on page 73.

Additionally good source of info about the audio interface is available here: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00259245.pdf.

The audio example is part of the standard examples for IAR STM32 SK board which we adjusted for our STM32-103STK. You can download free evaluation version for 30 days (which can be extended) from their web site. Note that the project is created with IAR EW for ARM version 5.50 which might be unavailable at their site currently BUT it compiles fine with the latest IAR EW for ARM available.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

jack97

Quote from: LubOlimex on November 15, 2012, 12:59:06 PM
Hello Jack,

Best idea would be to check the datasheet of the processor about the ADC http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00161566.pdf. page 20 and the characteristics table on page 73.

Additionally good source of info about the audio interface is available here: http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/APPLICATION_NOTE/CD00259245.pdf.

The audio example is part of the standard examples for IAR STM32 SK board which we adjusted for our STM32-103STK. You can download free evaluation version for 30 days (which can be extended) from their web site. Note that the project is created with IAR EW for ARM version 5.50 which might be unavailable at their site currently BUT it compiles fine with the latest IAR EW for ARM available.

Best regards,
Lub/OLIMEX

what do I need to program the board in IAR EW  http://www.coolcomponents.co.uk/catalog/debugger-p-742.html

http://www.coolcomponents.co.uk/catalog/tiny-cost-armusb-jtag-debugger-p-58.html

can I use any of them

LubOlimex

Yes, both will work via the GDB server in IAR EW. Please check this guide: https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_IAR.pdf. You will also need a download of OpenOCD - available at Freddie Chopin's web-site: http://www.freddiechopin.info/en/download/category/4-openocd.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex


jack97

How must I type the target for STM32-103 cfg

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/lpc2124.cfg

like this

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/STM32-103.cfg


jack97

Quote from: jack97 on November 16, 2012, 03:47:09 PM
How must I type the target for STM32-103 cfg

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/lpc2124.cfg

like this

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/STM32-103.cfg

is it stm32f1x_stlink.cfg 

thanks.

jack97

Quote from: jack97 on November 16, 2012, 06:04:14 PM
Quote from: jack97 on November 16, 2012, 03:47:09 PM
How must I type the target for STM32-103 cfg

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/lpc2124.cfg

like this

> openocd-libftdi.exe -f olimex-arm-usb-ocd-h.cfg -f ./tcl/target/STM32-103.cfg

is it stm32f1x_stlink.cfg 

thanks.

I can not find cfg file for the board  STM32-103

LubOlimex

Hello Jack,

It should look like:

stm32f1x.cfg or stm32.cfg

Depending on the OpenOCD version it might vary but for my version of OpenOCD (0.6.0) it looks like (when I have already navigated to the "bin" folder):

openocd-0.6.0.exe -f ./scripts/interface/olimex-arm-usb-tiny-h.cfg -f ./scripts/target/stm32f1.cfg

A good place to get the latest version of OpenOCD compiled for Windows is Freddie Chopin's website: http://www.freddiechopin.info/en/download/category/4-openocd

Regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

jack97

Quote from: LubOlimex on November 19, 2012, 01:02:15 PM
Hello Jack,

It should look like:

stm32f1x.cfg or stm32.cfg

Depending on the OpenOCD version it might vary but for my version of OpenOCD (0.6.0) it looks like (when I have already navigated to the "bin" folder):

openocd-0.6.0.exe -f ./scripts/interface/olimex-arm-usb-tiny-h.cfg -f ./scripts/target/stm32f1.cfg

A good place to get the latest version of OpenOCD compiled for Windows is Freddie Chopin's website: http://www.freddiechopin.info/en/download/category/4-openocd

Regards,
Lub/OLIMEX

Hi I am getting

error unable to open ftdi device : device not found
in procedure 'init'

do I have to change the jumpers or does the battery need to be

thanks.

LubOlimex

Hey there,

The mentioned error is because OpenOCD can't find the debugger:

Quoteerror unable to open ftdi device : device not found
in procedure 'init'

Have you installed the proper LibUSB drivers? Is your debugger ARM-USB-OCD-H? Does the debugger gets properly recognized in "Windows Device Manager"?

Please also refer to:

1. How to repair drivers - https://www.olimex.com/Products/ARM/JTAG/_resources/Repair-Procedure-for-OpenOcd-Rev.G-drivers.pdf

2. Using OpenOCD for flash programming -https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_PROGRAMMER.pdf

3. Using OpenOCD via Telnet -https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_TELNET.pdf

Best regards,
Lub/OLIMEX

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

jack97

#11
Quote from: LubOlimex on December 07, 2012, 09:04:15 AM
Hey there,

The mentioned error is because OpenOCD can't find the debugger:

Quoteerror unable to open ftdi device : device not found
in procedure 'init'

Have you installed the proper LibUSB drivers? Is your debugger ARM-USB-OCD-H? Does the debugger gets properly recognized in "Windows Device Manager"?

Please also refer to:

1. How to repair drivers - https://www.olimex.com/Products/ARM/JTAG/_resources/Repair-Procedure-for-OpenOcd-Rev.G-drivers.pdf

2. Using OpenOCD for flash programming -https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_PROGRAMMER.pdf

3. Using OpenOCD via Telnet -https://www.olimex.com/Products/ARM/JTAG/_resources/Manual_TELNET.pdf

Best regards,
Lub/OLIMEX

Best regards,
Lub/OLIMEX

Hi,

Yes my debugger is the ARM-USB-OCD-H  is that a problem, I use zadig_v2.0.1.160 to install but did not work do you know any other ways to install or drivers please

thanks.

jack97

#12
Im getting this now,

C:\Documents and Settings\xp\Desktop\openocd-0.6.1\openocd-0.6.1\bin> openocd-0.
6.1.exe -f ./scripts/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f ./scripts/target
/stm32f1x.cfg
Open On-Chip Debugger 0.6.1 (2012-10-07-10:34)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 1000 kHz
Info : TAP stm32f1x.cpu does not have IDCODE
Warn : JTAG tap: stm32f1x.cpu       UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x
0000, ver: 0x0)
Error: JTAG tap: stm32f1x.cpu  expected 1 of 1: 0x3ba00477 (mfg: 0x23b, part: 0x
ba00, ver: 0x3)
Info : TAP stm32f1x.bs does not have IDCODE
Warn : JTAG tap: stm32f1x.bs       UNEXPECTED: 0x00000000 (mfg: 0x000, part: 0x0
000, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 1 of 9: 0x06412041 (mfg: 0x020, part: 0x6
412, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 2 of 9: 0x06410041 (mfg: 0x020, part: 0x6
410, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 3 of 9: 0x16410041 (mfg: 0x020, part: 0x6
410, ver: 0x1)
Error: JTAG tap: stm32f1x.bs  expected 4 of 9: 0x06420041 (mfg: 0x020, part: 0x6
420, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 5 of 9: 0x06414041 (mfg: 0x020, part: 0x6
414, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 6 of 9: 0x06418041 (mfg: 0x020, part: 0x6
418, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 7 of 9: 0x06430041 (mfg: 0x020, part: 0x6
430, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 8 of 9: 0x06420041 (mfg: 0x020, part: 0x6
420, ver: 0x0)
Error: JTAG tap: stm32f1x.bs  expected 9 of 9: 0x06428041 (mfg: 0x020, part: 0x6
428, ver: 0x0)
Warn : Unexpected idcode after end of chain: 2 0x00000000
Warn : Unexpected idcode after end of chain: 34 0x00000000
Warn : Unexpected idcode after end of chain: 66 0x00100e06
Warn : Unexpected idcode after end of chain: 98 0x00000000
Warn : Unexpected idcode after end of chain: 130 0x00000000
Warn : Unexpected idcode after end of chain: 162 0x0380c000
Warn : Unexpected idcode after end of chain: 194 0x00000000
Warn : Unexpected idcode after end of chain: 226 0x00000000
Warn : Unexpected idcode after end of chain: 258 0x00000000
Warn : Unexpected idcode after end of chain: 290 0x00000000
Warn : Unexpected idcode after end of chain: 322 0x00000000
Warn : Unexpected idcode after end of chain: 354 0x00000000
Warn : Unexpected idcode after end of chain: 386 0x380c0000
Warn : Unexpected idcode after end of chain: 418 0x00000000
Warn : Unexpected idcode after end of chain: 450 0x00000000
Warn : Unexpected idcode after end of chain: 482 0x00000e03
Warn : Unexpected idcode after end of chain: 514 0x00000000
Warn : Unexpected idcode after end of chain: 546 0x00000000
Warn : Unexpected idcode after end of chain: 578 0x00000000
Error: double-check your JTAG setup (interface, speed, missing TAPs, ...)
Error: Trying to use configured scan chain anyway...
Error: stm32f1x.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
Polling target failed, GDB will be halted. Polling again in 3100ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms



C:\Documents and Settings\xp\Desktop\openocd-0.6.1\openocd-0.6.1\bin> openocd-0.
6.1.exe -f ./scripts/interface/ftdi/olimex-arm-usb-ocd-h.cfg -f ./scripts/target
/stm32f1x.cfg
Open On-Chip Debugger 0.6.1 (2012-10-07-10:34)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Error: stm32f1x.cpu: IR capture error; saw 0x0f not 0x01
Warn : Bypassing JTAG setup events due to errors
Warn : Invalid ACK 0x7 in JTAG-DP transaction
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms

LubOlimex

Hey jack97,

Please first ensure you power the board properly. If you power the board from mini USB you have to switch the jumper EXT/BAT to EXT position!

QuoteYes my debugger is the ARM-USB-OCD-H  is that a problem, I use zadig_v2.0.1.160 to install but did not work do you know any other ways to install or drivers please.

Our drivers are specific for our debuggers! The ones you have installed (zadig) will not do the job!

Please use these drivers instead: https://www.olimex.com/Products/ARM/JTAG/_resources/OpenOCD_OnlinePackage_v1.1.zip. When upgrading the drivers from "Windows Device Manager" browse to the folder you extracted this zip archive (and more specifically to the "Drivers/olimex-libusb-1.2.2.0" one.

I just took ARM-USB-TINY-H and STM32-103STK and they work fine here. Check my screenshot (notice I have placed my debugger cfg files in the bin folder): http://i.imgur.com/FBlxl.png?1.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex