Site Admin
Posts: 61
Joined: Tue Jul 14, 2015 7:29 am

EMW3165 Arduino Support

Wed Aug 12, 2015 8:43 pm

Roger Clark and the STM32Duino community seems to be spinning their wheels on adding Arduino support for the EMW3165 module. You can check out their on-going development thread here: http://www.stm32duino.com/viewtopic.php?f=45&t=426&start=30

I highly encourage anyone interested to lend a helping hand, with the level of support already present for STM MCU's, it shouldn't take too long to get this project running on these modules, which will really help lower the bar for other makers to start using this platform.

Posts: 9
Joined: Sat Jul 25, 2015 10:08 pm

Re: EMW3165 Arduino Support

Thu Aug 13, 2015 4:35 am

I finally got my modules up and running the other day, and promptly managed to kill the Wifi on one of them.

The STM32F411 core however is still working fine as far as I can tell, well at least STLink communicates with it

For those interested, I've done a couple of videos



These video's are not going to be anything new to anyone on this forum, unless you've not received your modules yet.

They do contain a bit of information about the existing / installed firmware, but its only what I can see by reading the Flash, but they are generally for people who have not investigated the EMW3165 before.

After my setback with killing the Wifi on one of my modules, I had to wire up another one (the one I attach to the STLink in the video), and I have backed up the existing firmware.

So the next job will be to wire an LED to one of the GPIO's and see if I can get a basic Arduino blink sketch working.

Posts: 9
Joined: Sat Jul 25, 2015 10:08 pm

Re: EMW3165 Arduino Support

Fri Aug 14, 2015 10:20 pm

I started to look at creating a new Arduino board for this, and have made some progress, but at the moment the processor is not operating at full speed.

The existing code we have is for the F103 which runs at 72Mhz and the F405 and F407 processors which run at 168MHz, where as the F411 runs at 100Mhz.

I modified the startup code to use the various PLL values that should be normal for the F411 but it wouldn't run.
But while doing some test, by accident, I didn't configure the PLL's at all and I can get a "Blink" sketch to work.

So the issue appears to be the code that handled the PLL settings.

But, even if we get the existing F4 Arduino core to run on the F411, the WICED libs will not compile because the "core" that we generally use is a "clean room" implementation that doesn't use the Standard Peripheral Library.
The reason that the "core" doesn't use the SPL is that when the core was originally written (in 2012 by Leaflabs for their STM32F103 based "Maple" boards), the SPL from STM for the F103 was not open source, hence could not be used. So Leaflabs wrote their own code from the ground up.

However, some of the community members have been independently developing a SPL / HAL based implementation of the Arduino "core".
The downside of this project, is that its only had a small amount of work, and the core libraries have not been ported, also it uses the latest CubeMX files from STM which are SPL HAL and not the older SPL files, so most the API calls have different names (with HAL in their name).

So WICED would probably need to be ported to get it to operate with the HAL version of the SPL.

I suppose one alternative is to develop and Arduino core based on the older pre-HAL version of STM's SPL, but I'm not sure this is an ideal thing to do, as it seems to be a bit short sighted in terms of future development.

User avatar
Posts: 63
Joined: Wed Jul 22, 2015 10:05 pm
Location: Iceland
Contact: Website

Re: EMW3165 Arduino Support

Tue Aug 18, 2015 12:47 pm

OMG, you may have given me a hint of why WICED doesn't work for me... it compiles and uploads just fine... perhaps it's the same PLL issue as you were having (assuming you were trying to use the ones from MICO at least)
Maintainer of the EMW3162 and EMW3165 port of Broadcom WICED.
== Github == Gitter.im chatroom == WICED subforum == Getting started with WICED on EMW ==

-- Neither I nor the WICED for EMW project are affiliated with MXCHIP or Broadcom --

Return to “STM32Duino”

Who is online

Users browsing this forum: No registered users and 1 guest