I'm making good progress with my Placid kernel (https://github.com/cmarrin/placid). Enough so, in fact that I want to get into some of the more advanced drivers. I spent quite some time with the ESP8266 and having a WiFi connection really simplifies a lot of things in working with the board. So I want to tackle that.
I read that the WiFi and Bluetooth features are connected via UART0. I also read that the chip used is the BCM43438. Looking at the data sheet, this chip has both SDIO and SPI interfaces. But there's no indication where the chip is actually hooked up in the RPi in this case. I saw these interesting lines in the Circle code:
CGPIOPin m_GPIO34_39[6]; // WiFi
CGPIOPin m_GPIO48_53[6]; // SD card
Since my SD card driver does indeed use those GPIO pins that's interesting. But does this imply that the SDIO interface is how to communicate with the chip? Or does it use SPI and UART0 can do SPI? I've found very little that is helpful in existing driver code that I've found on the web.
Does anyone have any more definitive information on how this chip works?
Re: Specs for RPi Zero W Wifi hardware?
A bit more information. I've discovered here:
http://www.raspberrypi.org/documentatio ... on/uart.md
https://www.raspberrypi.org/forums/view ... 44#p936754
That UART0 is used to talk to Bluetooth and SDIO (presumably on the pins I mentioned) talks to WiFi. Now I just need to hunt down the commands used to talk to WiFi through SDIO
http://www.raspberrypi.org/documentatio ... on/uart.md
https://www.raspberrypi.org/forums/view ... 44#p936754
That UART0 is used to talk to Bluetooth and SDIO (presumably on the pins I mentioned) talks to WiFi. Now I just need to hunt down the commands used to talk to WiFi through SDIO
-
- Posts: 133
- Joined: Sat Jan 13, 2018 12:29 am
Re: Specs for RPi Zero W Wifi hardware?
Is this at all similar to the raspberry pi 3 wifi?
Re: Specs for RPi Zero W Wifi hardware?
The same, bit not the same as the 3b+
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Re: Specs for RPi Zero W Wifi hardware?
From what I've read they are, for all intents and purposes the same. Apparently the Zero has an extra control line or something that allows it to transfer data somewhat faster, but I'm assuming that doesn't come into play much. I'm certainly not looking at performance. I'm just trying to get anything at all to work!
-
- Posts: 133
- Joined: Sat Jan 13, 2018 12:29 am
Re: Specs for RPi Zero W Wifi hardware?
Here is the link to the linux driver on the chip: https://github.com/raspberrypi/linux/tr ... oadcom/b43
I know far too little about how wifi actually works to get it working I will have to do some more research before I can come back to this.
I know far too little about how wifi actually works to get it working I will have to do some more research before I can come back to this.
Re: Specs for RPi Zero W Wifi hardware?
Thanks. I saw that. Awfully complex. Looks like if you want to run this thing you have to download some firmware into the BCM43438 and then talk to it with a "DHD". I'm a big fan of Stargate and all, this seems like an insurmountable task for a bare metal project. Maybe that's why I haven't come across anyone else foolish enough to try it.LizardLad_1 wrote: ↑Mon Oct 08, 2018 9:16 amHere is the link to the linux driver on the chip: https://github.com/raspberrypi/linux/tr ... oadcom/b43
I know far too little about how wifi actually works to get it working I will have to do some more research before I can come back to this.
Now, I'm also a big fan of the ESP8266. I've gotten its Wifi working, with autoconfig and all, in a tiny amount of code. So maybe the marriage of a RPi Zero and an ESP8266 would get me where I want to be. $5.00 for a Pi Zero and $2.00 for an ESP12 is looking pretty good right now
Re: Specs for RPi Zero W Wifi hardware?
Wifi is complex. Hence the driver is complex.cmarrin wrote: ↑Mon Oct 08, 2018 2:46 pmThanks. I saw that. Awfully complex. Looks like if you want to run this thing you have to download some firmware into the BCM43438 and then talk to it with a "DHD". I'm a big fan of Stargate and all, this seems like an insurmountable task for a bare metal project. Maybe that's why I haven't come across anyone else foolish enough to try it.LizardLad_1 wrote: ↑Mon Oct 08, 2018 9:16 amHere is the link to the linux driver on the chip: https://github.com/raspberrypi/linux/tr ... oadcom/b43
I know far too little about how wifi actually works to get it working I will have to do some more research before I can come back to this.
Yes, downloads firmware to the chip, then the driver talks to the firmware.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
-
- Posts: 133
- Joined: Sat Jan 13, 2018 12:29 am
Re: Specs for RPi Zero W Wifi hardware?
Why do you have to download firmware onto the chip in order to get it operational? Why can't registers be poked and prodded to interface with it? One last thing where is the firmware obtainable from?
Re: Specs for RPi Zero W Wifi hardware?
The firmware works like the firmware on the Pi SoC, it's a program that runs the wireless chip and provides services to the host. So it offloads a lot of work from the host CPU.LizardLad_1 wrote: ↑Mon Oct 08, 2018 8:44 pmWhy do you have to download firmware onto the chip in order to get it operational? Why can't registers be poked and prodded to interface with it? One last thing where is the firmware obtainable from?
The firmware binary is on a Pi in
/lib/firmware/brcm/
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.
Re: Specs for RPi Zero W Wifi hardware?
No different than working with an ESP8266. It has firmware that was downloaded to make the interface to an mcu or other really easy, there are various solutions making different (incompatible) interfaces to the ESP8266. Or with an ESP8266 you can write the firmware yourself that is downloaded and run.
networking in particular even what we could consider "simple" phys often have an 8051 or a z80 or other as it is easier overall to do some percentage of the work in hardware and some percentage in a programmable state machine so you can add/tweak/improve without a full chip spin. or a balance of size and cost and yield, etc....working up the network stack it is desireable to have more software involved, if a flaw happens in a common wifi chip (look around, even folks like cisco simply buy canned solutions rather than try to roll their own) a "simple" software upgrade can have a chance at fixing it rather than a massive recall of products from many vendors.
Just like not using an operating system on the pi itself and instead enjoying bare metal programming, it is technically possible to program these lower level chips (think ESP8266), but good luck finding documentation for some of them. Just figuring out 8051 vs z80 vs other comes from examining the binary and sorta guessing on what instruction set it is...(sometimes they just tell you if you are working with them on a product).
you choose if it is quicker to get a few bucks of wifi or other network chip up, just use serial and maybe boost the clock rate to make it faster, or to take a deeper tangent into the on/board peripheral so that you can make the higher level job easier or more efficient. its all part of the fun. if its not fun then definitely just by/borrow something off the shelf...If I want to restore a car do I grow a rubber tree and dig a mine to get metal and rubber to make my own tires or just buy some? do I pound some sheet metal into a fender? depends on the level of fun I am after.
networking in particular even what we could consider "simple" phys often have an 8051 or a z80 or other as it is easier overall to do some percentage of the work in hardware and some percentage in a programmable state machine so you can add/tweak/improve without a full chip spin. or a balance of size and cost and yield, etc....working up the network stack it is desireable to have more software involved, if a flaw happens in a common wifi chip (look around, even folks like cisco simply buy canned solutions rather than try to roll their own) a "simple" software upgrade can have a chance at fixing it rather than a massive recall of products from many vendors.
Just like not using an operating system on the pi itself and instead enjoying bare metal programming, it is technically possible to program these lower level chips (think ESP8266), but good luck finding documentation for some of them. Just figuring out 8051 vs z80 vs other comes from examining the binary and sorta guessing on what instruction set it is...(sometimes they just tell you if you are working with them on a product).
you choose if it is quicker to get a few bucks of wifi or other network chip up, just use serial and maybe boost the clock rate to make it faster, or to take a deeper tangent into the on/board peripheral so that you can make the higher level job easier or more efficient. its all part of the fun. if its not fun then definitely just by/borrow something off the shelf...If I want to restore a car do I grow a rubber tree and dig a mine to get metal and rubber to make my own tires or just buy some? do I pound some sheet metal into a fender? depends on the level of fun I am after.
Re: Specs for RPi Zero W Wifi hardware?
The big difference between the ESP8266 and the Zero W is that I know the ESP8266 and have it gotten it running alreadydwelch67 wrote: ↑Tue Oct 09, 2018 2:47 pmNo different than working with an ESP8266. It has firmware that was downloaded to make the interface to an mcu or other really easy, there are various solutions making different (incompatible) interfaces to the ESP8266. Or with an ESP8266 you can write the firmware yourself that is downloaded and run.
networking in particular even what we could consider "simple" phys often have an 8051 or a z80 or other as it is easier overall to do some percentage of the work in hardware and some percentage in a programmable state machine so you can add/tweak/improve without a full chip spin. or a balance of size and cost and yield, etc....working up the network stack it is desireable to have more software involved, if a flaw happens in a common wifi chip (look around, even folks like cisco simply buy canned solutions rather than try to roll their own) a "simple" software upgrade can have a chance at fixing it rather than a massive recall of products from many vendors.
Just like not using an operating system on the pi itself and instead enjoying bare metal programming, it is technically possible to program these lower level chips (think ESP8266), but good luck finding documentation for some of them. Just figuring out 8051 vs z80 vs other comes from examining the binary and sorta guessing on what instruction set it is...(sometimes they just tell you if you are working with them on a product).
you choose if it is quicker to get a few bucks of wifi or other network chip up, just use serial and maybe boost the clock rate to make it faster, or to take a deeper tangent into the on/board peripheral so that you can make the higher level job easier or more efficient. its all part of the fun. if its not fun then definitely just by/borrow something off the shelf...If I want to restore a car do I grow a rubber tree and dig a mine to get metal and rubber to make my own tires or just buy some? do I pound some sheet metal into a fender? depends on the level of fun I am after.

The interesting about the ESP vs the Zero W is that a Zero without Wifi costs $5 and an ESP costs $2 for a total of $7 vs. the Zero W at $10 (if you can find it at that price). Now the Zero W Wifi is much faster than the ESP, but the bring up with the ESP would be much quicker.
With that said, I'm going to look into uploading the firmware to the BCM43438 to see if I can talk to it. I'll let you know how it goes