Wifi chip on Photon/P1

Going through the firmware code I notice there is a platform/NET/CC3000/CC3000_Host_Driver/ directory. I also read on one of the posts that this (the Ti cc3000) changed to Broadcom BCM43362. So is there any use for the code in tthis sub-directory?

I also notice hal/src/photon/platforms/BCM9WCDUSI09 and hal/src/photon/platforms/BCM9WCDUSI14 which I presume are the wiced related code for photon and P1 respectively? I could not find this part number on Broadcom’s site; the closest I came across was BCD943362WCD4.

Many thanks in advance

@armystic, you need to look at the “latest” or “develop” branches of the firmware repo. These have the latest code. Note that the Broadcom WICED library code is not open just yet though it will be in the near future. :smile:

2 Likes

We very much still support the Core and will be releasing firmware updates for the Core, which is why the CC3000 is still in our source repository.

2 Likes

Thank you very much @peekay123 for the clarification on the wiced front. That would be a great resource when it happens.

Also thank you to @mdma for the clarification on the TI question. (I have been reading through some of your firmware code for the past few days, Kudos)

The second part of my query however has been left unanswered. Maybe I need to clarify myself a little more. It is actually very basic set up that I am trying to figure out:

OK, assuming I want to make my own photon/P1, I need a BCM43362 and a STM32F205RGY6 on top of a PCB with the schematics and design described on the datasheet for Photon/P1 (that has been removed from the website, so I can’t accesss it now)

The firmware running on BCM43362 is factory flashed (and in anycase I wouldn’t imagine anybody trying to tweak a working Wi-Fi stack or would you?), so I assume it is the rest of the firmware loaded on STM32F205RGY6 that I need to run the FreeRTOS/wiced stuff (or ThreadX alternative) after cross compiling using toolchain makefiles.

While I find the contents of hal/src/photon/platforms/BCM9WCDUSI09/README.txt very intriguing, I have trouble figuring out why we need a USI WM-N-BM-09 or BCM9MWCD2WCDAD WICED module adapter, if the BOM is what I just described in the previous paragraph. In particular if someone could descibe BCM9WCDUSI09/ and BCM9WCDUSI14/ and their differences andrelationship with photon/P1 I would most appreciate it. I find the reference (mentioned in the aforementioned README.txt) http://broadcom.com/wiced/platforms/BCM943362WCD4/schematics/ just redirects to a generic IoT page! :confused:

Thank you in advance!

PS anyone know when the datasheets will be online again?

@armystic, the Photon uses the BCM9WCDUSI09 (P0) module and adds other components in a nice through-hole or surface moutable (castelated edges) package which is perfect for makers and developers. Key here is the addition of the onboard antenna, LED, buttons, regulator, and FCC certification. The “bare” P0 is the module which you described above (wifi + STM32) and it is available separately for volume production. Adding your own antenna, etc. will mean that you must get FCC certification.

The BCM9WCDUSI14 (P1) module combines the BCM9WCDUSI09 and a PCB antenna/antenna connector in a single shielded package which is also FCC certified (though not wearable certified). The module still requires regulated power and external decoupling.

Several members hand-built Cores and Photons successfully. Buying the modules from Particle means that factory Particle firmware is already installed and the one-time cloud access license ($2/device) is covered. :smile:

1 Like

Many thanks @peekay123! Great reply.

So looking at the header file platform.h for BCM9WCDUSI14:

BCM9WCDUSI14 platform pin definitions …

  • Pin#
    -Pin Name on Module
  • Module GPIO alias
  • STM32 port
  • Peripheral Available
  • Board Connection
  • Peripheral Alias

So I assume the STM32 using the wiced library interacts with BCM43362 (providing the PCB connections do their job). So the firmware on BCM43362 remains off-limits to programmers?

Staying on this table where are the Peripheral available definitions? I could not find these definitions elsewhere in the source code.

@armystic, Particle is working with Broadcom to allow sharing of their library files but I don’t know when that will be accomplished. :smile:

1 Like

Thanks again for the great insights @peekay123. It sheds a lot of light on the scope of things, how they fit together and where they are going. cheers :smile:

Thanks for the :+1: on my code @armystic!

The WiFi firmware is in fact sent to the BCM43362 over the SDIO bus when initializing WiFi - there's a 220k (iirc) binary resource that's included in WICED as simply a large C array that gets compiled in with the libraries. (So even if you do have the WICED source code, there's nothing to see regarding the WiFi firmware, since that's provided in binary form.)

That’s pretty cool. Thanks very much @mdma . Could you please point out which wiced library does this? I tried “nm” on almost all of the libraries and could not find this resource.

On a side note, It makes sense too I suppose since the stack stuff would need to be pretty compact and well-tuned. ( There could be other reasons too, which one could only guess) cheers, :smile:

The wifi driver is in resources.a

Great. Sure enough all the wifi_firmware_image symbols. I was searching for SDIO_WriteData to find where this was :mag_right: . Thanks a lot @mdma

I am very much on the same course as @armystic but have some additional questions:

  1. Would I be correct in saying the binary download is only the (non IP) firmware for the 43362?
  2. Would it also be correct to state that the IP stack runs on the STM32F205, NOT on the 43362?
  3. Some time ago it was discussed that Photon/Px firmware would migrate to use FreeRTOS, any update on this?
  4. Lastly, is it possible to buy the P1 without the US$2 cloud license fee, since we are looking to use it for a completely private enterprise function?

Thanks

Hi @ammaree

You're correct, the 43362 code is just the WiFi driver, the IP stack is LwIP and that runs on the STM32F205. The Photon/P0/P1 use the WICED WIFI SDK which incorporates FreeRTOS, so the photon et al. is already running FreeRTOS. In the not too distant future, we will be releasing a firmware update that runs the cloud code on a separate thread so that the application thread is never blocked by system tasks.

I believe that is possible, but let's call in @corey to be doubly sure!

[Sorry did not realize @mdma had already sent an answer, looks like I misunderstood IP, I thought LwIP runs on the Broadcom module which according to @mdma not the case; it runs on STM32xx ]

Hi @ammaree, I will try and have a go at answering, maybe others could correct/add;

The wifi firmware binary will be uploaded on the WiFi module on boot up by the wiced libraries. Once that process is complete the Wifi module will handle all TCP/IP (If that is what you mean by IP) and WiFi related tasks.

Also it seems that the FreeRTOS is already available (At least all the relevant libraries or most of them are there), so it seems that this task has already been accomplished. (I was not aware that it had not been ported to FreeRTOS at some stage)

For you last question, I don’t see why not, since I suppose if you don’t pay the cloud fee your module will still work but won’t have cloud access. But Particle people would be the best to confirm that.

Happy Learning :smile: