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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 7:29 pm

I'm aware of this... it's just a side-effect of using the new WICED version with the platform files I originally created for an older version of WICED.
Sorry about not having fixed it yet... I've been busy at work these last few days.

I actually thought it did build, with only warnings, but I must not have been paying enough attention when I was testing this out. I'll try fixing this today.
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 --

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 7:42 pm

Try it now :) it builds without errors for me now.

I'm going to go now and try to get my dev board to work.
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 --

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 8:22 pm

Awesome! Thanks - I pulled the updates you checked into the repo and everything compiles nicely now. :D

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 10:31 pm

3 characters can make a world of difference :)

I just did surgery on my dev board, gluing down a lifted pad, cleaning up the solder mess after using the heatgun to remove the emw3165 module, getting rid of the serial port connector and battery holder. I also glued the emw3165 that I removed from the dev board to one of your breakout boards, though I've yet to solder it on. I decided to glue it before soldering, so I don't end up with an offset module again, as happened when I soldered it to the dev board.

I'm not sure it still works, I've blasted it with my heatgun twice now and it did smoke a bit after detaching it today, but I have another one and hopefully another devboard from the Seeed recipe contest.

You might want to edit your breakout board files, to make the soldermask have an obvious pin 1 marking, for orientation. I wasn't a 100% sure about the orientation, until I traced a pin and compared to the datasheet.

I've been considering to make a dev board that is similar in construct to the one on the WifiMCU and more like the green EMW3162 devboard in functionality than the EMW3165 devboard and the black EMW3162 devboard, with a single USB connector connected to FT2232 for both JTAG and UART and to provide power.
I really don't like the MXCHIP devboards, too big and bulky, a lot bigger than they have to due to the NFC antenna, AA battery holder, serial connector and I especially don't like the one for the EMW3165, due to the breakout pins being 2mm pitch, making it rather harder to use.
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 --

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 11:12 pm

That's great - good luck. Let's hope that smoke you saw was just the adhesive on the back of the FCC sticker burning off :-P That's always what I like to believe.

That's a good point about the missing pin1 indicator - my design intention was to have the antenna of the module hang off the edge of the board, however without being inside my head, I don't think there's a way for anyone else to know that since I didn't write that anywhere. I'll make the orientation clear on the next board I do since I can't update the gerber files on DirtyPCBs without placing a new order.

Yeah - I didn't even bother ordering the MXCHIP eval board because I saw that it'd be more of a hassle to use than it's worth. My ideal board would basically be exactly what you described plus a good LiPo charger and place to connect a decent sized battery. It's overkill for most products, but I like the BQ25895 coupled with a 2200mAH+ 18650 battery - get fast charging in under an hour and enough juice for even the most power hungry wifi device to run for a few hours.

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 11, 2015 11:32 pm

Yeah, the power circuitry on the MXCHIP devboards is pretty cool. You might want to take a look at it, for reference. It supports both power over USB and has a buck/boost IC that allows various sizes of batteries. It might be a better idea though to have a LiPo controller rather than a buck/boost converted, as it makes a lot more sense to support a single cell LiPo, rather than huge variety of voltages. The charger circuit could then be hooked up to the same USB as an FT2232H, that would serve as UART and JTAG IC.

Any board would also have at least a couple of buttons, connected to GPIOs (defined as WICED_BUTTON1 and WICED_BUTTON2) for being easily able to trigger a halt in the bootloader. As the JTAG pins on EMW3162 were shared with SPI1, I added the functionality to halt the bootloader when you held down the two user buttons during reset, before the pins being reassigned from JTAG to something else.
Two user buttons+reset button would do the trick for that. WICED_BUTTON1 is also used for triggering a factory reset, a native WICED functionality.
It would also be prudent to have a couple of LEDs, assuming there are no LEDs on the module itself.

One downside using the FT2232H is how expensive it is, $6.7 in single units and $3.6 in 1000+ on digikey. However, it prevents the use of a 20 pin JTAG header, or having to make some sort of adapter between the jlink adapter and a smaller footprint connector.
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 --

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

Re: Broadcom WICED SDK on EMW3165

Thu Aug 13, 2015 1:27 pm

You might want to add a couple of subforums. One for WICED and one for MICO.
I assume some people will use MICO and the WICED support is likely going to be the foundation for most projects on the platform, including the Arduino, MicroPython, esprduino or whatever all of that is called, as it provides all the standard STM32F4 and CMSIS libraries and also has the driver for the wifi chip, so the WICED project may be the most important of all.
I doubt much will be built on top of MICO, at least while they don't support free IDEs and compilers.
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 --

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

Re: Broadcom WICED SDK on EMW3165

Sun Aug 16, 2015 8:11 am

That's a very good point - I agree. I've added the subtopics for each of those to this forum.

I checked in with MXCHIP on Thursday of last week, MiCO GCC support is still 3+ weeks out. I still haven't received my breakout boards either, hopefully they come on Monday, it's impacting my ability to contribute anything meaningful.

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

Re: Broadcom WICED SDK on EMW3165

Tue Aug 18, 2015 12:34 pm

WICED btw does not work on EMW3165 yet. I'm debugging it. I can compile and flash successfully, but I suspect it's never properly jumping from the bootloader to the actual application.
Hopefully it should be up and running in a couple of days or so, depending on how much I can get done with my kids still on summer vacation :p

EMW3162 works with the new WICED 3.3.1, so something in the platform config is broken for EMW3165.
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 --

kjk
Posts: 1
Joined: Sat Aug 22, 2015 1:55 pm

Re: Broadcom WICED SDK on EMW3165

Sat Aug 22, 2015 2:36 pm

Hi,

I was poking around in the WICED SDK (for EMW3165) and noticed that the interrupt handlers for the USART interrupts are passing the incorrect platfom_uart_driver instance onto the platform_uart_*() functions. The configuration file (platforms/EMW3165/platform.h) assigns WICED_UART_1 to STDIO_UART *but* platform.c assigns USART2 to WICED_UART1 in the platform_uart_peripherals array. Thus, when handling the interrupts for usart2 one should pass the platform_uart_driver instance bound to WICED_UART_1.

I noticed this when I built my first test app (I selected 'EMW3165-snip.stdio-SDIO-debug' as it seemed relatively simple - just stdio bits). I modified the build system slightly so that it would run out of ram. It compiled / linked ok (with a bit of help) but when it was loaded and run via the debugger it hung itself.

The main thread was getting stuck in an io function, and at the same time the DMA interrupt routine was constantly running. Turned out this was a consequence of the (incorrect) driver instance not matching it's completion flags with the state of the DMA status register (as it was not properly initialised) so the interrupt flag was not being cleared and the blocked IO thread was not being signalled.

Simply changing the usart2_*_irq interrupt handlers in platform.c to provide the WICED_UART_1 platform driver fixed it - so now the stdio demo app runs nicely out of ram. I did also have to disable the call to wiced_init() in stdio.c to reduce the amount of library code it was using but this was only so that I could fit it all into ram.

Admittedly I am not yet running it out of flash (as I am not across how that all hangs together yet and was not keen to run in and erase the default application ... yet) but I am pretty sure this bug would manifest in any application that uses stdout (and possibly the other serial port, for the same reason).


Return to “Firmware Development”

Who is online

Users browsing this forum: No registered users and 1 guest