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

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 7:38 am

You can compile with:

Code: Select all

$ dtc -@ -I dts -O dtb -o sdio-overlay-final.dtbo sdio-overlay-final.dts
However, I would make the name something more meaningful like wilc_sdio.dtbo. Whatever name you choose, copy the .dtbo to /boot/overlays and add "dtoverlay=your_name.dtbo" to config.txt.

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:05 am

PhilE wrote:
Fri May 17, 2019 7:38 am
You can compile with:

Code: Select all

$ dtc -@ -I dts -O dtb -o sdio-overlay-final.dtbo sdio-overlay-final.dts
However, I would make the name something more meaningful like wilc_sdio.dtbo. Whatever name you choose, copy the .dtbo to /boot/overlays and add "dtoverlay=your_name.dtbo" to config.txt.
Ok thank you.
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

wilc-sdio
Can wilc-sdio.ko be anywhere or does it have to be in /lib/modules/<kernel_version>/kernel/drivers/staging/ ?

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

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:11 am

It needs to have been processed by the "depmod" utility (i.e. you will have to run depmod) along with all of the other modules - I don't think you can add modules one at a time - so it should be somewhere under /lib/modules/<kernel_version>, but I don't think it matters precisely where.

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:30 am

Hi,

This is my final setup.

Image

I used the version in wilc git repo.

I have this in my /boot/config.txt

Code: Select all

dtoverlay=sdio,poll_once=off,bus_width=4
Cheers,
Attachments
final setup.png
final setup.png (188.12 KiB) Viewed 5295 times
Last edited by kaushalyas on Fri May 17, 2019 8:40 am, edited 1 time in total.

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:33 am

Thank you. I don't have the same version as of ATWILC1000-SD as you. I guess that the pin above the 9 SDIO pins are chip_en, irq and reset, right ?

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 8:37 am

Good news... and bad news. It works once for me !

After that, I disconnected the wire and the kernel crashed. Now that I have rebooted the raspi, the mmc1 isn't working anymore... any idea ?

Code: Select all

pi@raspberrypi:~$ sudo cat /sys/kernel/debug/mmc1/ios
clock:          0Hz
vdd:            0 (invalid)
bus mode:       2 (push-pull)
chip select:    0 (don't care)
power mode:     0 (off)
bus width:      0 (1 bits)
timing spec:    0 (legacy)
signal voltage: 0 (3.30 V)
driver type:    0 (driver type B)

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Fri May 17, 2019 12:21 pm

Hi, Yeah the above row of pins of the ATWILC include en, reset nd irq. I havent wired any of them. The driver apparently doesnt support out-bound interrupt (It uses DAT1 as the in-bound irq) So you should disable it in kernel config. However you need to assign a GPIO to it, otherwise driver probe fails.

One thing I noted in the driver is that the en and reset GPIOs gets configured as inputs when driver loads. I coudn't dig deep into whats happening there. Will check it. But as we use the dev kit, we should be ok.

You mean when you load the driver, you loose the sdio? I didn't experience anything like that.

How I tried debugging might help you as well. Since after the kernel oops I cant get any dmesgs, I wired up a USB to ethernet interface to CMIO. Then I get ssh to eth0, and run "dmesg -w" to continuously receive the dmesgs on the ssh terminal. Then I load the driver in my serial terminal. That way I could see what's happening almost real time. May be you can do something similar to observe whats happening when you load the driver.

Also kill the dhcpcd daemon by "sudo dhcpcd -k" before loading the driver. Otherwise as soon as wlan0 interface is up, the dhcpcd starts the DHCP session and causes the kernel oops.

Good luck and let me know if I can be of any help.

Cheers,

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 1:57 am

Hi,

I found the problem. I was just trying to disconnect and reconnect the dev board like I use to do when I was using poll_once=false...

Now, it works. I'm able to use it as a STA or a softAP. Thank you for your help !

Now I will try to run some test to see if the kernel oops are frequent. For the moment, my wiring is not really nice and I got a kernel oops if I move the board or when there is some vibration. I hope this will be fixed once I use it on a pcb. Although, it would have been nice if this wifi module didn't cause a kernel oops every time there is a problem.

Cheers,
Antoine

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 2:45 am

Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 3:08 am

kaushalyas wrote:
Tue May 21, 2019 2:45 am
Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas
I have followed this tutorial : https://www.raspberrypi.org/documentati ... s-point.md

I think it's easier and it works for me. (No need the rooting part if you don't need internet access.)

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 21, 2019 9:44 am

kaushalyas wrote:
Tue May 21, 2019 2:45 am
Hey Antoine,

Thats good news. Congrats.

I think the wiring is a big contributor to the oops, but also I think there is a bug in the driver that does not gracefully handle a CMD52 read operation failure. I will try to contact the maintainers to get it sorted.

I am trying to get the SoftAP working. I am refering to "http://ww1.microchip.com/downloads/en/D ... rGuide.pdf" but not clear about S80dhcp-server stuff. Could you please shed some light?

Cheers,
kaushalyas
Does the cmd52 & cmd53 prevent you from running the module? I often have the "Failed cmd53, read reg.." error that prevent me to set up the wlan..

It's even more frustrating to be stuck here now that I've managed to use the module as a softAP several times.

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Wed May 22, 2019 4:59 am

Hi,

I dont see any failure of CMD52/53 no in my case. I am not 100% sure what causes the CMD52/53 failure.

Also I cant get the AP mode running after following the raspberry Pi document.

I can see following network interfaces.

Code: Select all

mon.wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        unspec 00-00-00-00-00-00-30-30-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.110.11.5  netmask 255.255.0.0  broadcast 10.110.255.255
        inet6 fe80::faf0:5ff:fee5:46c5  prefixlen 64  scopeid 0x20<link>
        ether f8:f0:05:e5:46:c5  txqueuelen 1000  (Ethernet)
        RX packets 48172  bytes 4760911 (4.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47552  bytes 4689913 (4.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
The IP for the wlan0 is from dhcpcd. Should I disable dhcp on wlan0 and assign a static IP?

Also I time to time get the

Code: Select all


[  602.086826] wilc_sdio mmc1:0001:1 wlan0: INFO [debug_thread]*** Debug Thread Running ***
[  608.486877] wilc_sdio mmc1:0001:1 wlan0: INFO [debug_thread]*** Debug Thread Running ***
[  613.457670] wilc_sdio mmc1:0001:1 wlan0: INFO [add_key]Adding key with cipher suite = fac04
[  613.457685] wilc_sdio mmc1:0001:1 wlan0: INFO [add_key]b80881a0 b9cc0000 2
[  613.457697] wilc_sdio mmc1:0001:1 wlan0: INFO [add_key]key d3 28 61
[  613.457765] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[  613.470506] pgd = 2857ec76
[  613.475466] [00000000] *pgd=00000000
[  613.481269] Internal error: Oops: 17 [#1] SMP ARM

Message from syslogd@raspberrypi at May 22 06:03:05 ...
 kernel:[  613.481269] Internal error: Oops: 17 [#1] SMP ARM
[  613.488773] Modules linked in: ipt_MASQUERADE iptable_nat nf_nat_ipv4 nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 snd_bcm2835(C) bcm2835_codec(C) v4l2_mem2mem bcm2835_v4l2(C) v4l2_common bcm2835_mmal_vchiq(C) raspberrypi_hwmon snd_pcm videobuf2_vmalloc videobuf2_dma_contig hwmon snd_timer videobuf2_memops snd videobuf2_v4l2 videobuf2_common videodev media vc_sm_cma(C) fixed uio_pdrv_genirq uio wilc_sdio sha256_generic cfg80211 rfkill ip_tables x_tables ipv6
[  613.544732] CPU: 0 PID: 45 Comm: kworker/u8:1 Tainted: G         C        4.19.42-v7+ #2
[  613.557975] Hardware name: BCM2835
[  613.564032] Workqueue: WILC_wq handle_key [wilc_sdio]
[  613.571748] PC is at handle_key+0x218/0x80c [wilc_sdio]
[  613.578311] LR is at   (null)
[  613.582582] pc : [<7f18feec>]    lr : [<00000000>]    psr: 60000013
[  613.590205] sp : b9f71e70  ip : b657f680  fp : b9f71f0c
[  613.596790] r10: 00000000  r9 : 00000000  r8 : b657f640
[  613.603377] r7 : b5848b20  r6 : 00000001  r5 : b9cc0500  r4 : b96bfb70
[  613.611241] r3 : 00000000  r2 : 00000000  r1 : 00000000  r0 : b657f650
[  613.619060] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  613.627534] Control: 10c5383d  Table: 358f806a  DAC: 00000055
[  613.634646] Process kworker/u8:1 (pid: 45, stack limit = 0xf14412c0)
[  613.642389] Stack: (0xb9f71e70 to 0xb9f72000)

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Wed May 22, 2019 9:44 am

kaushalyas wrote:
Wed May 22, 2019 4:59 am
Hi,

I dont see any failure of CMD52/53 no in my case. I am not 100% sure what causes the CMD52/53 failure.

Also I cant get the AP mode running after following the raspberry Pi document.

I can see following network interfaces.

Code: Select all

mon.wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        unspec 00-00-00-00-00-00-30-30-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.110.11.5  netmask 255.255.0.0  broadcast 10.110.255.255
        inet6 fe80::faf0:5ff:fee5:46c5  prefixlen 64  scopeid 0x20<link>
        ether f8:f0:05:e5:46:c5  txqueuelen 1000  (Ethernet)
        RX packets 48172  bytes 4760911 (4.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 47552  bytes 4689913 (4.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
The IP for the wlan0 is from dhcpcd. Should I disable dhcp on wlan0 and assign a static IP?
What do you mean ? Did you add this in /etc/dhcpcd.conf ?

Code: Select all

interface wlan0
    static ip_address=192.168.4.1/24
    nohook wpa_supplicant

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Thu May 23, 2019 4:44 am

Hi, I initially tried it with DHCP on station mode.

I have

Code: Select all

source-directory /etc/network/interfaces.d
auto wlan0

allow-hotplug wlan0
iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
in /etc/network/interfaces

My idea is to run both client and AP modes concurrently. Have you done that?

When I remove that section and have static IP assigned as you mentioned, I can see the AP. But after some time it disappears!!

Also I can see

Code: Select all

[FAILED] Failed to start Advanced IEEE 802.11… 802.1X/WPA/WPA2/EAP Authenticator.
when it boots up.

Cheers,

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Thu May 23, 2019 8:21 am

No I haven't done that, I can't help you on this part sorry.

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Mon May 27, 2019 9:01 am

Hi !

Have you succeeded to resolve your problem ?

For my side, I decided to buy a new module and it work now (well, sometime at least). However, it doesn't run at the boot (the module wilc-sdio.ko is not loaded even if I added wilc-sdio in /etc/nodules), but this is a minor problem.

One more thing, I'm curious about the way you install the driver, do you do like this ?

Code: Select all

sudo rpi-update
sudo reboot
sudo apt-get install git bc bison flex libssl-dev libncurses5-dev -y
git clone --depth=1 https://github.com/linux4wilc/driver
git clone --depth=1 https://github.com/linux4wilc/firmware
git clone --depth=1 https://github.com/raspberrypi/linux
rm linux/drivers/staging/wilc1000/*
cp driver/wilc/* linux/drivers/staging/wilc1000/
cd linux
KERNEL=kernel7
make bcm2709_defconfig
make menuconfig
	>>add device drivers -> staging drivers -> wilc sdio module
make prepare
make modules_prepare
make modules SUBDIRS=drivers/staging/wilc1000/
sudo cp drivers/staging/wilc1000/wilc-sdio.ko /lib/modules/<kernel_version>/kernel/drivers/staging/
sudo nano /boot/config.txt
	>>add this line at the end : dtoverlay=sdio,poll_once=off
sudo reboot
sudo mkdir /lib/firmware/mchp 
sudo cp firmware/wilc1000_wifi_firmware.bin /lib/firmware/mchp/
sudo apt-get -y install hostapd
sudo insmod /lib/modules/<kernel_version>/kernel/drivers/staging/wilc/wilc-sdio.ko
Cheers,
Antoine

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Tue May 28, 2019 1:28 am

Hi Antoine,

It seems like you are building it locally. I cross compiled it in my Ubuntu virtual environment and flashed the kernel, DTBs, overlays and drivers to the eMMC by using rpiboot as explained in https://www.raspberrypi.org/documentati ... uilding.md

To integrate the driver to kernel source, I followed the Section 2 of http://ww1.microchip.com/downloads/en/D ... 05329C.pdf. I did what is mentioned in section 2.1 and 2.2 so didnt used the staging.

As I have mentioned, I modified the sdio-overlay.dts. Then did kernel menuconfig to enable the microchip driver and build the image.

As I don't have buildroot configured yet, I first flashed the pre-built Raspbian Stretch Lite image to the CM3+. Then I could mount the boot and root partitions into my dev environment after running rpiboot utility. Then I could update kernel, drivers, dtb and overlays to appropriate folders.

Then finally modified the /boot/config.txt to include

Code: Select all

dtoverlay=sdio,poll_once=off,bus_width=4
Your git clone paths seems correct.

Cheers,
Kaushalyas

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 28, 2019 8:38 am

Hi,

Thank you for the precision. Yes, I am building the driver locally without any dependencies so I don't have to rebuild the whole kernel. I don't know if this can cause stability issues but at least it works for my test.

You have managed to merge the sdio-overlay with the one you sent or do you your custom one as sdio-overlay ?

Cheers,

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Tue May 28, 2019 8:43 am

Hi,

Yes I think build locally or cross compiled wouldn't affect the stability. What errors you see now?

I just edited the existing sdio-overlay.dts and update as what I have attached. Then build it dts and update the eMMC as given in raspberry pi kernel build page.

Cheers,

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Tue May 28, 2019 8:53 am

Now it works when I install the driver on the stretch image but it doesn't work with my application (A web server is running on the raspi and the user can access to this server when he is connected to the raspi access point).

So when I run the driver, I got the error : "mmc1 sdio cmd53 failed, error(-84)". I think I've made a mistake during the installation that disrupts sdio communication. That's why I am trying to follow a clean installation process now.

EDIT: I've managed to make it work, thank you for precision. I still have some kernel oops sometime. I guess it's because of the wiring so we will see how it work on a pcb.

Cheers,

kaushalyas
Posts: 19
Joined: Fri Apr 05, 2019 4:10 am

Re: SDIO1 CM3+ WILC1000

Tue May 28, 2019 10:45 am

hmm this is the same I was seeing before reducing the clock, the dreaded CMD52/53 failures with error -84 and sometimes -110(based on memory).

You have shorten up the wiring? make sure the clock is low? or even make it lower and see.

Cheers,
Kaushalyas

antoinebore
Posts: 53
Joined: Fri Apr 12, 2019 4:01 am

Re: SDIO1 CM3+ WILC1000

Fri May 31, 2019 4:03 am

OK, I found the problem. The server tried to use the GPIO25 which is used for the SDIO communication.

Now all work as expected, thank you for your help !

User avatar
Scprt
Posts: 2
Joined: Wed Jan 29, 2020 12:18 pm

Re: SDIO1 CM3+ WILC1000

Thu Jan 30, 2020 11:07 am

Hi ,

Sorry for bumping this topic but i am trying to work with atwilc1000. i read this topic and i did everything that was spoken.
I have CM3+ and RPi3b+ ,

Code: Select all

Linux raspberrypi 4.19.97-v7+ #1293 SMP Wed Jan 22 17:10:55 GMT 2020 armv7l GNU/Linux
This is my results for mmc;

Code: Select all

[    0.829411] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    0.832343] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    2.383855] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    2.392169] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    2.471285] mmc1: new high speed SDIO card at address 0001
[    2.479388] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.623220] mmc0: new high speed MMC card at address 0001
[    2.632043] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[    2.639584] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[    2.648734] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[    2.657223] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB, chardev (246:0)
[    2.668643]  mmcblk0: p1 p2

and cat ;

Code: Select all

clock:		25000000 Hz
actual clock:	25000000 Hz
vdd:		21 (3.3 ~ 3.4 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	2 (sd high-speed)
signal voltage:	0 (3.30 V)
driver type:	0 (driver type B)

and it's my errors ;

Code: Select all

[  142.017127] wilc_sdio: no symbol version for module_layout
[  142.017149] wilc_sdio: loading out-of-tree module taints kernel.
[  142.017164] wilc_sdio: module is from the staging directory, the quality is unknown, you have been warned.
[  142.027248] Registering wifi device
[  142.027265] Max scan ids= 10,Max scan IE len= 1000,Signal Type= 1,Interface Modes= 844
[  142.027736] Initializing Locks ...
[  142.042027] wifi_pm : 0
[  142.042118] wilc_sdio mmc1:0001:1: succesfully got gpio_reset
[  142.042160] wilc_sdio mmc1:0001:1: succesfully got gpio_chip_en
[  142.042186] wifi_pm : 1
[  142.042226] wilc_sdio mmc1:0001:1: succesfully got gpio_reset
[  142.042266] wilc_sdio mmc1:0001:1: succesfully got gpio_chip_en
[  142.049829] wilc_sdio mmc1:0001:1: Driver Initializing success
[  142.185807] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185855] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185891] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185926] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185960] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185994] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186029] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186064] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186098] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186135] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186172] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186209] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186244] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186277] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186311] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186346] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186380] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186415] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186449] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186484] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186519] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186553] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.187109] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[d2ad150e] wlan0
[  142.187113] WILC POWER UP
[  142.187121] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_init_host_int]Host[d2ad150e][c2d6543d]
[  142.187130] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]*** re-init ***
[  142.187136] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[  142.187143] wilc_sdio mmc1:0001:1: SDIO speed: 25000000
[  147.556378] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  147.556391] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (003b0000)...
[  147.556398] [wilc start]: fail read reg 0x3b0000
[  152.925325] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  152.925339] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (00001000)...
[  152.925349] wilc_sdio mmc1:0001:1: Unsupported chipid: 0
[  152.925366] wilc_sdio mmc1:0001:1 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED
[  152.925377] wilc_sdio mmc1:0001:1 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc
[  152.927221] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[d2ad150e] wlan0
[  152.927234] power up request for already powered up source Wifi
[  152.927240] Device already up. request source is Wifi
[  152.927255] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_init_host_int]Host[d2ad150e][c2d6543d]
[  152.927271] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]*** re-init ***
[  152.927283] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[  152.927295] wilc_sdio mmc1:0001:1: SDIO speed: 25000000
[  158.296843] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  158.296910] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (003b0000)...
[  158.296917] [wilc start]: fail read reg 0x3b0000
I have printed pcb , and module alone and both have same err.
What am I doing wrong? , thanks for your help in advance.

pkar
Posts: 1
Joined: Wed Feb 19, 2020 9:25 am

Re: SDIO1 CM3+ WILC1000

Wed Feb 19, 2020 9:34 am

Scprt wrote:
Thu Jan 30, 2020 11:07 am
Hi ,

Sorry for bumping this topic but i am trying to work with atwilc1000. i read this topic and i did everything that was spoken.
I have CM3+ and RPi3b+ ,

Code: Select all

Linux raspberrypi 4.19.97-v7+ #1293 SMP Wed Jan 22 17:10:55 GMT 2020 armv7l GNU/Linux
This is my results for mmc;

Code: Select all

[    0.829411] mmc-bcm2835 3f300000.mmc: could not get clk, deferring probe
[    0.832343] sdhost-bcm2835 3f202000.mmc: could not get clk, deferring probe
[    2.383855] mmc-bcm2835 3f300000.mmc: mmc_debug:0 mmc_debug2:0
[    2.392169] mmc-bcm2835 3f300000.mmc: DMA channel allocated
[    2.471285] mmc1: new high speed SDIO card at address 0001
[    2.479388] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.623220] mmc0: new high speed MMC card at address 0001
[    2.632043] mmcblk0: mmc0:0001 BJTD4R 29.1 GiB
[    2.639584] mmcblk0boot0: mmc0:0001 BJTD4R partition 1 4.00 MiB
[    2.648734] mmcblk0boot1: mmc0:0001 BJTD4R partition 2 4.00 MiB
[    2.657223] mmcblk0rpmb: mmc0:0001 BJTD4R partition 3 4.00 MiB, chardev (246:0)
[    2.668643]  mmcblk0: p1 p2

and cat ;

Code: Select all

clock:		25000000 Hz
actual clock:	25000000 Hz
vdd:		21 (3.3 ~ 3.4 V)
bus mode:	2 (push-pull)
chip select:	0 (don't care)
power mode:	2 (on)
bus width:	2 (4 bits)
timing spec:	2 (sd high-speed)
signal voltage:	0 (3.30 V)
driver type:	0 (driver type B)

and it's my errors ;

Code: Select all

[  142.017127] wilc_sdio: no symbol version for module_layout
[  142.017149] wilc_sdio: loading out-of-tree module taints kernel.
[  142.017164] wilc_sdio: module is from the staging directory, the quality is unknown, you have been warned.
[  142.027248] Registering wifi device
[  142.027265] Max scan ids= 10,Max scan IE len= 1000,Signal Type= 1,Interface Modes= 844
[  142.027736] Initializing Locks ...
[  142.042027] wifi_pm : 0
[  142.042118] wilc_sdio mmc1:0001:1: succesfully got gpio_reset
[  142.042160] wilc_sdio mmc1:0001:1: succesfully got gpio_chip_en
[  142.042186] wifi_pm : 1
[  142.042226] wilc_sdio mmc1:0001:1: succesfully got gpio_reset
[  142.042266] wilc_sdio mmc1:0001:1: succesfully got gpio_chip_en
[  142.049829] wilc_sdio mmc1:0001:1: Driver Initializing success
[  142.185807] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185855] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185891] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185926] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185960] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.185994] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186029] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186064] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186098] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186135] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186172] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186209] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186244] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186277] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186311] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186346] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186380] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186415] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186449] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186484] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186519] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.186553] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mgmt_frame_register]Return since mac is closed
[  142.187109] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[d2ad150e] wlan0
[  142.187113] WILC POWER UP
[  142.187121] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_init_host_int]Host[d2ad150e][c2d6543d]
[  142.187130] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]*** re-init ***
[  142.187136] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[  142.187143] wilc_sdio mmc1:0001:1: SDIO speed: 25000000
[  147.556378] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  147.556391] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (003b0000)...
[  147.556398] [wilc start]: fail read reg 0x3b0000
[  152.925325] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  152.925339] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (00001000)...
[  152.925349] wilc_sdio mmc1:0001:1: Unsupported chipid: 0
[  152.925366] wilc_sdio mmc1:0001:1 wlan0: ERR [wilc_wlan_initialize:905] Initializing WILC_Wlan FAILED
[  152.925377] wilc_sdio mmc1:0001:1 wlan0: ERR [wilc_mac_open:1029] Failed to initialize wilc
[  152.927221] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]MAC OPEN[d2ad150e] wlan0
[  152.927234] power up request for already powered up source Wifi
[  152.927240] Device already up. request source is Wifi
[  152.927255] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_init_host_int]Host[d2ad150e][c2d6543d]
[  152.927271] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_mac_open]*** re-init ***
[  152.927283] wilc_sdio mmc1:0001:1 wlan0: INFO [wilc_wlan_init]Initializing WILC_Wlan
[  152.927295] wilc_sdio mmc1:0001:1: SDIO speed: 25000000
[  158.296843] wilc_sdio mmc1:0001:1: wilc_sdio_cmd53..failed, err(-110)
[  158.296910] wilc_sdio mmc1:0001:1: Failed cmd53, read reg (003b0000)...
[  158.296917] [wilc start]: fail read reg 0x3b0000
I have printed pcb , and module alone and both have same err.
What am I doing wrong? , thanks for your help in advance.

Hi Scprt,

I'm getting the same output as you, were you able to figure out what was going wrong?

I am use the WILC100-SD board. I have shortened the wires as much as a I can and have even tried to reduce the clock below 5MHz, but nothing seems to help.

I tried the driver direct from Atmel as well as the one in the RPi repo (not sure what the difference or even if there is one), but they both produce the same result.

I'm going to see if I can get a scope on the signals see if there is something to learn there.

User avatar
Scprt
Posts: 2
Joined: Wed Jan 29, 2020 12:18 pm

Re: SDIO1 CM3+ WILC1000

Fri Apr 17, 2020 11:17 am

pkar wrote:
Wed Feb 19, 2020 9:34 am


Hi Scprt,

I'm getting the same output as you, were you able to figure out what was going wrong?

I am use the WILC100-SD board. I have shortened the wires as much as a I can and have even tried to reduce the clock below 5MHz, but nothing seems to help.

I tried the driver direct from Atmel as well as the one in the RPi repo (not sure what the difference or even if there is one), but they both produce the same result.

I'm going to see if I can get a scope on the signals see if there is something to learn there.

Hi pkar ,


I found a few problems.
First, the atwilc1000 in the RPi repo does not work. I'm using Atmel driver. Unfortunately, low speeds are not a solution. I tried lowering the first speeds, but I get errors at low speeds, so I chose speeds between 12.5k and 25k.

The second problem is the RESET_N pin. The problem arises if there is power in the pin at the system startup. I do the HIGH output for the pin when the system is turned on. Datasheet writes that there should be at least 5 ms difference with system power.But driver need more than 5.

If even one of the cables is not transmitting fully, there is a problem. There was a problem in the area where I connected CM3 + module on the PCB so one of the pins was non-contact. When I checked it all seemed to be running smoothly. When I soldered again, 1 of the problems was solved.

Return to “Compute Module”