rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Aug 15, 2019 1:07 am

PhilE,

After applying the last overlay dts file. the Bluetooth interface runs! :)

systemctl status hciuart.service shows

Code: Select all

● hciuart.service - Configure Bluetooth Modems connected by UART
   Loaded: loaded (/lib/systemd/system/hciuart.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-08-15 01:27:35 BST; 31min ago
  Process: 364 ExecStart=/usr/bin/btuart (code=exited, status=0/SUCCESS)
 Main PID: 498 (hciattach)
    Tasks: 1 (limit: 2200)
   Memory: 1.1M
   CGroup: /system.slice/hciuart.service
           └─498 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 flow - b8:27:eb:cd:6b:ec

Aug 15 01:27:28 raspberrypi systemd[1]: Starting Configure Bluetooth Modems connected by UART...
Aug 15 01:27:35 raspberrypi btuart[364]: bcm43xx_init
Aug 15 01:27:35 raspberrypi btuart[364]: Flash firmware /lib/firmware/brcm/BCM4345C0.hcd
Aug 15 01:27:35 raspberrypi btuart[364]: Set BDADDR UART: b8:27:eb:cd:6b:ec
Aug 15 01:27:35 raspberrypi btuart[364]: Set Controller UART speed to 3000000 bit/s
Aug 15 01:27:35 raspberrypi btuart[364]: Device setup complete
Aug 15 01:27:35 raspberrypi systemd[1]: Started Configure Bluetooth Modems connected by UART.
Thank you for your help PhilE.

Question : For the WiFi a simple ping google.com will test the interface.
What is the best way to test if the BLUETOOTH interface works properly?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Aug 15, 2019 7:51 am

Works? That's tricky, but "hcitool dev" will verify that the interface exists.

rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Aug 15, 2019 9:48 am

PhilE,

hcitool dev shows

Devices:
hci0 B8:27:EB:CD:............

Also using "sudo hcitool -i hci0 lescan" I am able to detect BLE devices nearby.

At this point we would like to design a hat board with the Cypress WiFi/BT CYW43455 chip for the CM IO Board V3 https://www.raspberrypi.org/products/co ... -board-v3/

I am aware that a Raspberry Pi 3 Model B+ reduced schematic is available online.
Is it possible to obtain a partial Raspberry Pi 3 Model B+ schematic that shows the connections and circuitry around the CYW43455 ?
This information will be used to create a hat board initially but later on will be used in a final product featuring the CM3 Plus module.

Thanks

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Aug 15, 2019 9:56 am

Given that somebody had to go to some effort to produce the partial schematics, why would we have held back some of the design just until somebody asked for it?

rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Aug 15, 2019 10:23 am

Good point.

Thank you very much again for your help PhilE.
It's very appreciated

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Fri Sep 06, 2019 9:08 pm

To respond to PhilE comment on this topic....
Another Pi Foundation colleague (Roger Thornton) had a blog post recently.
Roger was soliciting inputs from users on how the Pi Foundation could better help with commercial applications of the Pi platform, including the CM3+.

One way would be to have fuller disclosure of 3B/3B+ schematics or providing reference carrier board schematics for CM3+ .

Our application of the CM3+ requires WiFi/BT support with WiFi having simultaneous AP+STA (managed) modes. The Pi 3B and 3B+ do this quite well. To achieve this support on CM3+, one of these two things are needed:

1) Sufficient disclosure of a hardware schematic (3B, 3B+ or reference CM3 carrier board) so that a WiFi/BT module with same chipset (CYW43438 or CYW43455) can be wired correctly (SDIO + Serial) to the CM3+ pins to match the Pi3B (CYW43438) or Pi3B+ (CYW43455). Without the ability to modify driver source files, a different WiFi/BT chip can't be used ( or maybe others are supported?).
One must match chip and wiring on CM3+ to the same GPIO on 3B or 3B+ so that the drivers will work unmodified

OR

2) Sufficient disclosure of the software driver source files to allow modification/compilation so that other WiFi/BT chipsets to be used with the CM3+ . Does Cypress or other WiFi/BT module vendors offer loadable drivers under Raspbian that work with CM3+?

We have searched for a USB WiFi/BT adapter (dongle) - but none have a chipset that supports AP+STA mode. In another forum post, Dougie Lawson states that to have AP +STA would require 2 USB adapters - that adds too much cost for our design.

Thanks for your consideration.
Regards,
Mike Kirk

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Fri Sep 06, 2019 9:25 pm

I take it you've already given Roger that feedback?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Fri Sep 06, 2019 9:40 pm

1) Sufficient disclosure of a hardware schematic (3B, 3B+ or reference CM3 carrier board) so that a WiFi/BT module with same chipset (CYW43438 or CYW43455) can be wired correctly (SDIO + Serial) to the CM3+ pins to match the Pi3B (CYW43438) or Pi3B+ (CYW43455).
Any chipset will come with a datasheet giving the wiring requirements. Other people have succeeded in building the 43438 into a HAT (RedBear, for one) without special help with the hardware.
Without the ability to modify driver source files, a different WiFi/BT chip can't be used ( or maybe others are supported?).
One must match chip and wiring on CM3+ to the same GPIO on 3B or 3B+ so that the drivers will work unmodified
The drivers are open source code in the Linux kernel - you can modify all you want. The only support from the firmware is to waggle the reset lines and provide a GPCLK, which can either be done by from Linux or via the dt-blob.bin and HAT GPIO programming.
2) Sufficient disclosure of the software driver source files to allow modification/compilation so that other WiFi/BT chipsets to be used with the CM3+ . Does Cypress or other WiFi/BT module vendors offer loadable drivers under Raspbian that work with CM3+?
As above, the drivers are part of the standard Linux source code, but can be used without modification or recompilation. Once the SDIO device is probed the correct driver is automatically located.
We have searched for a USB WiFi/BT adapter (dongle) - but none have a chipset that supports AP+STA mode. In another forum post, Dougie Lawson states that to have AP +STA would require 2 USB adapters - that adds too much cost for our design.
That may well be true - it isn't something we've looked into. If you can make the WIFi in a Pi 3B or 3B+ do it then it shouldn't be difficult to add sufficient hardware to make a CM3+ also do it. There are enough overlays out there to enable the SD bus on the necessary pins with various bus widths.

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Mon Sep 09, 2019 6:31 pm

PhilE:

Thanks for this info, I was not aware of this HAT board.
And yes, Roger Thornton has my inputs posted above.

The Red Bear IoT WiFi/BT HAT appears to be discontinued - Red Bear is now part of Particle.
However, the reference info and schematics showing the required connections are very helpful.

Avnet (Newark/element14/Farnell) has a few left in stock - I will pick up one to try out.

Also, regarding drivers, my past understanding was that Pi foundation camera GPU drivers were closed source.
I mistakenly thought this was the case for all Pi drivers in Raspbian - that was incorrect.

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Mon Sep 16, 2019 4:24 pm

Another question,

Is the WiFi/BT module on the Pi4 and 3B+ available for purchase and use on a CM3+ carrier board?
Meaning it is a metal can encapsulating a complete WiFi/BT module on a PCB - that is soldered to the Pi PCB?

Or are there discrete components (including the CYW43455) soldered to the Pi and the metal can is soldered to the Pi PCB?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Mon Sep 16, 2019 4:27 pm

> Or are there discrete components (including the CYW43455) soldered to the Pi and the metal can is soldered to the Pi PCB?

This, as you can see if you look carefully around the edge of the can.

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Sep 19, 2019 2:11 pm

Murata makes the 1MW Wifi/BT module https://wireless.murata.com/type-1mw.html
This uses same CYW43455 chipset as on Pi 3B+ and Pi 4.
The 1MW is FCC/IC certified and will support external antennas.

We need an external antenna which Pi 3B+ does not offer.
Can we disable on-board CYW43455 and connect the Murata 1MW module (on HAT) using
the same SDIO (WIFI) GPIO pins 22-27 ALT3 SD1 CLK,CMD,DAT0-DAT3
and serial port (BT) GPIO pins 14-17 ALT0 - TXD0,RXD0 and ALT3 - CTS0/RTS0 ??

Or will there be contention with the disabled CYW43455 on the Pi 3B+ ?

This would be a more cost effective solution than going to a CM3+ and carrier board, as we also need the CSI, USB and Ethernet available on Pi 3B+

Regards,
Mike Kirk

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Sep 19, 2019 2:15 pm

Just add "dtoverlay=sdio" to config.txt to switch the SDIO function to GPIOs 22-27. Run "dtoverlay -h sdio" for more info.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Sep 19, 2019 2:21 pm

I don't think there's an overlay to enable UART0 flow control on GPIOs 16-17. A custom overlay would look something like this:

Code: Select all

/dts-v1/;
/plugin/;

/{
	compatible = "brcm,bcm2835";

	[email protected] {
		target = <&uart0_pins>;
		__overlay__ {
			brcm,pins = <14 15 16 17>;
			brcm,function = <4 4 7 7>;
			brcm,pull = <0 2 2 2>;
		};
	};
};

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Sep 19, 2019 2:27 pm

OK -thanks. This will target the SD1 (ALT3) for WiFi and not affect the SD0 (ALT0) used by the micro SD flash filesystem?

And I would do a similar dt-overlay=uart0 for the PL011 serial port to interface the HAT Bluetooth instead of the on-board chip?

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Sep 19, 2019 2:40 pm

OK -thanks. This will target the SD1 (ALT3) for WiFi and not affect the SD0 (ALT0) used by the micro SD flash filesystem?
Yes - the help information is misleading/incorrect when it refers to sdhost - this is SD1:

Code: Select all

			sdio_ovl_pins: sdio_ovl_pins {
				brcm,pins = <22 23 24 25 26 27>;
				brcm,function = <7>; /* ALT3 = SD1 */
				brcm,pull = <0 2 2 2 2 2>;
			};
And I would do a similar dt-overlay=uart0 for the PL011 serial port to interface the HAT Bluetooth instead of the on-board chip?
No - use the custom overlay I posted.

DS Lin
Posts: 1
Joined: Tue Sep 24, 2019 2:15 am

Re: CM3 Plus and WiFi/BT CYW43455

Tue Sep 24, 2019 2:58 am

rlev wrote:
Sun Aug 11, 2019 6:11 pm
/* UPDATE */

PhilE,

After rechecking my wiring and shorting some cables I was able to get the SDIO interface working :

ifconfig shows :

Code: Select all

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2  bytes 78 (78.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 78 (78.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.9  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::29d:6bff:fea0:7eb9  prefixlen 64  scopeid 0x20<link>
        ether 00:9d:6b:a0:7e:b9  txqueuelen 1000  (Ethernet)
        RX packets 1721  bytes 159523 (155.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 297  bytes 31285 (30.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And I am able to ping google.com

Thank you very much for your help PhilE.

Now second part is to get the BLUETOOTH to work.

For the CM3 Plus board. How to configure a UART to use pins 30-33 using a custom overlay?

Any help is appreciated it.
Hi Rlev,

Can you help me provide your /boot/config.txt wifi configure??
I have managed to get a sd card recognized as a storage using the next line in config.txt and wiring the sd card breakout board to pins 22-27
dtoverlay=sdio,sdio_overclock=25

mkirk
Posts: 45
Joined: Tue Mar 06, 2018 4:21 pm

Re: CM3 Plus and WiFi/BT CYW43455

Wed Sep 25, 2019 8:48 pm

These modules also require port pins to control one or more of these signals:
WL_HOST_WAKE
WL_REG_ON
BT_REG_ON
BT_HOST_WAKE
BT_DEV_WAKE

Are these pins controlled by the driver?
A DT overlay is needed to map them to GPIO so the driver can use them?

Or should the application set these pins as needed ? I would think not, as asynchronously disabling the WL_REG_ON or BT_REG_ON by the application would confuse the driver.

Thanks,
Mike

rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Tue Nov 12, 2019 12:01 pm

@DS Lin.

This the full config.txt

Hope it helps.

Code: Select all

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d

# sdio tweak
dtoverlay=sdio,poll_once=off,sdio_overclock=25



rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Tue Nov 12, 2019 12:15 pm

Hi Guys.

As explained in this thread using the CM3 Plus and a WiFi/BT CYW43455 is working using
pins 22-27 and next line in config.txt
dtoverlay=sdio,poll_once=on,sdio_overclock=25


Instead of pins 22-27. How can I switch to use pins 34-39 instead?
What changes has to be applied?

Thank you in advance.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Tue Nov 12, 2019 12:17 pm

Code: Select all

[email protected]:~$ dtoverlay -h sdio
Name:   sdio

Info:   Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
        and enables SDIO via GPIOs 22-27. An example of use in 1-bit mode is
        "dtoverlay=sdio,bus_width=1,gpios_22_25"

Usage:  dtoverlay=sdio,<param>=<val>

Params: sdio_overclock          SDIO Clock (in MHz) to use when the MMC
                                framework requests 50MHz

        poll_once               Disable SDIO-device polling every second
                                (default on: polling once at boot-time)

        bus_width               Set the SDIO host bus width (default 4 bits)

        gpios_22_25             Select GPIOs 22-25 for 1-bit mode. Must be used
                                with bus_width=1. This replaces the sdio-1bit
                                overlay, which is now deprecated.

        gpios_34_37             Select GPIOs 34-37 for 1-bit mode. Must be used
                                with bus_width=1.

        gpios_34_39             Select GPIOs 34-39 for 4-bit mode. Must be used
                                with bus_width=4 (the default).

rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Thu Nov 14, 2019 2:53 am

Thank you for feedback PhilE.

I have changed next line in my config.txt
from

Code: Select all

dtoverlay=sdio,poll_once=off,sdio_overclock=25
to

Code: Select all

dtoverlay=sdio,poll_once=off,sdio_overclock=25,gpios_34_39

and the wifi interface does not start :(

ifconfig shows " lo no wireless extensions."

Any hints?

Thanks in advance.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Thu Nov 14, 2019 2:24 pm

I would remove "poll_once=off" - in the early days of Pi 3B the frequent polling of the device was known to cause a problem.

What output do you get from:

Code: Select all

$ dmesg | grep -E "(mmc1|brcmfmac)"

rlev
Posts: 30
Joined: Sat Dec 15, 2018 2:20 pm

Re: CM3 Plus and WiFi/BT CYW43455

Sat Nov 16, 2019 12:38 pm

PhilE

I am using now

Code: Select all

dtoverlay=sdio,sdio_overclock=25,gpios_34_39

Code: Select all

$ dmesg | grep -E "(mmc1|brcmfmac)"

[    2.089519] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.100712] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.111786] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.226211] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.238130] mmc1: queuing unknown CIS tuple 0x80 (6 bytes)
[    2.371513] mmc1: error -110 whilst initialising SDIO card
[    2.529101] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[    2.540553] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.551969] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[    2.564837] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[    2.577141] mmc1: queuing unknown CIS tuple 0x80 (6 bytes)
[    2.654875] mmc1: error -110 whilst initialising SDIO card
[    2.864875] mmc1: error -110 whilst initialising SDIO card
[    3.133332] mmc1: error -110 whilst initialising SDIO card

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2489
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: CM3 Plus and WiFi/BT CYW43455

Sat Nov 16, 2019 6:13 pm

Does "raspi-gpio 34-39" show the function being selected? It should, I just want to confirm.

You could try lowering the clock even further - 10 MHz, for example - just in case the signal quality isn't great.

Return to “Compute Module”