If I use STM32, do I need RaspberryPi as well?

Post here first, or if you can't find a relevant section!
Post Reply
Sdack
Posts: 13
Joined: Sun Oct 01, 2017 10:40 pm

If I use STM32, do I need RaspberryPi as well?

Post by Sdack » Tue Oct 03, 2017 6:25 am

Hi folks,

I'm a complete n00b, my debut post with an overview of my first electronics project can be found here http://stm32duino.com/viewtopic.php?f=2&t=2651.

Being new to this area I'm unsure where the border lies between micro controllers and a computer like my RaspberryPi.

My extended time lapse project requires ultra low power control (but the RaspberryPi lacks a sleep mode), so I thought an STM board could offer to meet this need but just now I've been looking at the Arduino Project Hub https://create.arduino.cc/projecthub/search?q=wifi and see that there are wifi capable STM boards such as the Adafruit WICED WiFi Feather - STM32F205 with Cypress WICED WiFi https://core-electronics.com.au/adafrui ... -wifi.html so I'm wondering if the Raspberry Pi is needed at all.

The main duties I have in mind for the Raspberry Pi are file transfer from the Canon Camera via USB (via CHDK-PTP) http://chdk.wikia.com/wiki/PTP_Extension and upload to the Internet for progress and peace of mind monitoring of the long term project.

Please advise if I could reduce the complexity to a single device. I'm not, however, sure if there exists any STM appropriate code to make this work in the STM environment

Below is a snippet from the CHDK-WIKI

https://app.assembla.com/wiki/show/chdkptp
About chdkptp

chdkptp is a client application for the CHDK PTP Extension

Comments? Questions? Bug reports? Patches? Please use the chdk forum: https://chdk.setepontos.com/index.php?action=forum

Platforms
chdkptp is developed for MS Windows, Linux on x86/x64 and raspberry pi.

Additional Platforms
OSX
Several users have reported successfully building and running chdkptp under OSX. See README-OSX.TXT in the source for more information. chdkptp is not developed for or tested by the developer on OSX, so this may be out of date. Patches, comments and corrections welcome.

Other ARM SBCs
Work is also on its way to get as least the CHDKPTP CLI running on an ODroid XU board and a BeagleBone Black. Help to make that a reality is appreciated, more information here :

CHDKPTP on oDroidXU
and
CHDKPTP on BeagleBone Black

Arch Linux
chdkptp package is available from AUR, see package page.
Any advice will be welcome

Nigel
Byron Bay
Australia

User avatar
zoomx
Posts: 540
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: If I use STM32, do I need RaspberryPi as well?

Post by zoomx » Tue Oct 03, 2017 10:28 am

Download data mean that the STM32 USB must be configured as Master. As far as I know there is not such option in any STM32 core (but I am not sure for STM official core). Maybe it will be possible using the original STM SDK.

Using a raspberryPi an option could be turning it off and on. When on it will download photo, put somewhere and then shutdown. You can turn it on every our.

Sdack
Posts: 13
Joined: Sun Oct 01, 2017 10:40 pm

Re: If I use STM32, do I need RaspberryPi as well?

Post by Sdack » Wed Oct 04, 2017 2:35 am

Thanks Zoomx,
Another highly experienced member, ahull, PM'd me this morning informing me that I WILL need my Raspberry Pi to do any CHDK-PTP operations that interface with the camera.
Cheers
Nigel

acassis
Posts: 22
Joined: Mon Sep 18, 2017 3:27 pm

Re: If I use STM32, do I need RaspberryPi as well?

Post by acassis » Wed Oct 04, 2017 1:31 pm

I think when zoomx refers to USB Master he means USB Host, the same way you have USB Device. The STM32F103C8 has only support for USB Device, but high-end STM32 microcontrollers also supports USB Host and OTG. He is right, you need a microcontroller with USB Host/OTG support to get it working with the camera (that is a USB Device). Also you will need support for PTP/MTP protocol on microcontroller side, it is necessary to let it "see" the files in the camera.

User avatar
zoomx
Posts: 540
Joined: Mon Apr 27, 2015 2:28 pm
Location: Mt.Etna, Italy

Re: If I use STM32, do I need RaspberryPi as well?

Post by zoomx » Wed Oct 04, 2017 2:14 pm

acassis,
you're right, usb Host. None STM32 cores has support for it even if the MCU has support. So you have to use the STM SDK.

ag123
Posts: 795
Joined: Thu Jul 21, 2016 4:24 pm

Re: If I use STM32, do I need RaspberryPi as well?

Post by ag123 » Thu Oct 05, 2017 12:53 pm

ideally simply have both of them :D
visited your post on the RPi usb camera project
http://stm32duino.com/viewtopic.php?f=2&t=2651
with RPi you could interface a usb camera,
for the lazy you could use say the canon camera or for that matter buy any usb cameras (e.g. from logitech) and plug that into RPi
for the hardworking and hardcore you could do this project as well and you have an absolutely DIY RPi camera project + DIY stm32 usb camera
viewtopic.php?f=19&t=4
oh and newbie warning, on RPi you are spoilt with megabytes of ram, you can use python and even java if you like
on stm32f103c8 or stm32f103cb you have 20k sram to play with
:lol:

dwight
Posts: 5
Joined: Sat Jul 22, 2017 1:46 am

Re: If I use STM32, do I need RaspberryPi as well?

Post by dwight » Wed Nov 22, 2017 4:00 pm

The STM32F107 has a OTG USB and can be used as a master. A place to start is with a Gotek floppy emulator ( around $20 on ebay ). You should be able to use the regular IDE that can take a STM32F103. You'll also need a USB to 5V-RS232 to talk to it, for a couple bucks more. To get code see FloppyFlash on github.
The Gotek has the USB connector already and can be run from a 5V supply. The rest, you'll have to hack together but I think it would make a good starting point. It is always good to have a working PC board to start from.
I believe the one they use has 128K of flash as well.
I've been meaning to start a different project but haven't had much time.
Dwight

Post Reply