• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » WLAN Applications Forum » wl1271 and power management
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

wl1271 and power management

This question is answered
Bernard Seller
Posted by Bernard Seller
on Dec 21 2011 13:26 PM
Intellectual430 points

I have a wl1271 module connected to an OMAP 4430

When using the wl12xx driver with this module I get the following error

"chip id doesn't match after firmware boot"


a Google search seem to associate this with Power Management  issues

In my case the WL_EN pin on the wl1271 module is always enabled 

Has anyone been able to run the wl12xx driver (I am using version 2.6.38 on Ubuntu) when power management is not used????

  (or is this error message caused by something else)

thanks

Bernard

WL1271
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Elad Raz92038
    Posted by Elad Raz92038
    on Dec 22 2011 04:04 AM
    Expert1580 points

    Hi Bernard,

    Are you using omappedia OMAP4 versions? These version already setup the sequence order, which is the other way around. First the WLAN driver is being loaded -> toggle the WLAN_EN -> Inject the SDIO driver.

    The SDIO shouldn't be loaded before that. See "carddetection" feature in the kernel (TIWLAN_SDIO_CONFIG)

    - Elad.

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Dec 22 2011 08:51 AM
    Intellectual430 points

    The sequence is correct except that as I said,  WLAN_EN is always enabled on our system

    When I do "ifconfig wlan0 up" I get the following trace (I added some printk to see what is going in more details)

    [ 1008.992584] DBG>  wl1271_op_start
    [ 1008.992584] DBG>  wl1271_op_add_interface
    [ 1008.992614] DBG>  wl1271_chip_wakeup
    [ 1009.017944] DBG>  wl1271_sdio_set_power
    [ 1009.017974] DBG>  wl1271_sdio_power_on (st 0)
    [ 1009.017974] iCORAL icoral_set_ios : clk (25000000) vdd (0x14) pwr (1) bus (0)
    [ 1009.074432] DBG>  wl1271_sdio_power_on power restore (ret 0)
    [ 1009.283538] DBG>  wl1271_sdio_init
    [ 1009.284088] DBG>  wl1271_fw_wakeup
    [ 1009.284118] DBG>  wl1271_setup
    [ 1009.284149] DBG>  wl1271_fetch_firmware
    [ 1009.309661] DBG>  wl1271_fetch_nvs (code 0)
    [ 1009.309692] DBG>  wl1271_fetch_nvs (fw size 912)

    [ 1010.372955] DBG > wl1271_boot_run_firmware chip id 0x10101 vs wl.chip.id 0x4030111
    [ 1010.372955] wl1271: ERROR chip id doesn't match after firmware boot


    thanks for your help

    Bernard



    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Dec 22 2011 14:29 PM
    Expert1580 points

    intersting. The chip ID is the first SDIO command that is read from the chip. The command is read using SDSIO CMD 52 (1 byte read).

    It's look like that we area reading "01" value 3 times, hence the result.

    Can you debug the SDIO and see if the sdio_sync_read() works?

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Dec 23 2011 09:01 AM
    Intellectual430 points

    it is a bit strange since this is the reading of the CHIP ID in wl1271_fetch_formware

    A lot of CMD 52 & 53 have taken palce before this read with no apparent errors (the chip is recognized properly as a wl1271 , etc.)

    Also a quick search of the Internet has showed other people having similar problems ... but with no clear solution to the problem

    Bernard

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Dec 24 2011 19:55 PM
    Expert1580 points

    The CHIP is is reading a value from the HW. (Using CMD 52)

    It can be read before FW download and after FW boot.

    But, the FW boot started with "partition" command, which changes the memory layout of the chip.

    I'm not sure which NLCP version you have, but can you look for all the "read-chip-id" (Just grep CHIP_ID_B) and see their values?

    If the value is wrongly read after "partition", please send me the exact hw-address of CMD 52

    - Elad.

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Dec 28 2011 10:14 AM
    Intellectual430 points

    I am using compat-wireless version 3.2

    The CHIP_ID_B is read properly in wl1271_chip_wakeup & wl1271_load_firmware

    but when it reaches wl1271_boot_run_firmware it gets the wrong value (or maybe partial value)

    I am a bit puzzled at the address translation process ...

    Here is the trace

    thanks for the help

    Bernard

    [  409.601715]  DBG> wl1271_op_start
    [  409.601745]  DBG> wl1271_op_add_interface
    [  409.601745]  DBG> wl1271_chip_wakeup
    [  409.893829]  DBG> wl1271_fw_wakeup

    [  409.893859]  DBG> wl1271_read32
    [  409.893859]  addr 0x305674 translates to 0x5674
    [  409.893890]  DBG> wl1271_chip_wakeup CHIP ID = 0x4030111

    [  409.893890]  DBG> wl1271_setup
    [  409.893890]  DBG> wl1271_fetch_firmware
    [  409.922302]  DBG> wl1271_load_firmware

    [  409.926727]  DBG> wl1271_read32
    [  409.926727]  addr 0x305674 translates to 0x1a634
    [  409.926757]  DBG> wl1271_load_firmware CHIP ID = 0x4030111

    [  410.089477]  DBG> wl1271_boot_run_firmware

    [  410.089569]  DBG> wl1271_read32
    [  410.089569]  addr 0x305674 translates to 0x1ce34
    [  410.089599] iCORAL req opcode=53 arg:0x279c6804 read >> 0x0 0x0 0x11 0x1 -----
    [  410.089630]  DBG> wl1271_boot_run_firmware CHIP ID = 0x1110000
    [  410.089630]  DBG> wl1271_boot_run_firmware chip id 0x1110000  vs wl.chipid 0x4030111
    [  410.089630] wl1271: ERROR chip id doesn't match after firmware boot

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Dec 29 2011 02:46 AM
    Expert1580 points

    A partition process is dividing the chip's memory for SDIO transaction. It also affects registers address.

    Why don't you move to the latest R4 in the git? 

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Dec 29 2011 09:37 AM
    Intellectual430 points

    I am currently using compat-wireless-3.2-rc6.3 

    from http://linuxwireless.org/en/users/Download/stable#compat-wireless_3.2_stable_releases

    Is R4 more recent?

    One thing that I am wondering is if the fact that my card is always powered ON and always enabled has an impact on the Initialization of the state machine in the WL1271?

    When I compare the calls to the wl12xx driver for a bulit-in wl1271 (working) module and my external wl1271 (non-working) card

    - the sequence of wl1271 function calls is the same up-to my CHIP ID problem

    - the translated addresses are the same in both cases, so it looks like I am reading the right region

    Bernard

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Dec 29 2011 10:00 AM
    Expert1580 points

    The latest code can be found in the git. R4 is the latest, soon is about to be release the R5 (as far as I know).

    I think that the fact that the WLAN_EN is always ON is making you these type of troubles.

    Be able to toggle the WLAN_EN for reset (or recovery) is important.

    I don't have your full logs, but maybe the WLAN driver try to reset the chip and changes his state machine as if the partition table was converted back to default. And this is why the chip-id have different values in it.

    It's not such a big design change to just connect the WLAN_EN to a GPIO... 

    Elad.

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Jan 03 2012 14:19 PM
    Intellectual430 points

    Unfortunately, connecting  WLAN_EN to a GPIO to be able to toggle it has not  solved my problem (see trace below)

    The first 2 read of CHIP_ID_B are good

    and the one in wl1271_boot_run_firmware fails ...

    Note that power management is disabled - could it be part of the problem? has anyone run the wl12xx with power management turned off?

    thanks

    Bernard



    [  209.847839]  DBG> wl1271_op_start
    [  209.847869]  DBG> wl1271_op_add_interface
    [  209.847869]  DBG> wl1271_chip_wakeup
    [  209.877838]  DBG> wl1271_sdio_power_on

    [  210.143920]  DBG> wl1271_fw_wakeup
    [  210.143951]  DBG> wl1271_read32
    [  210.143951]  addr 0x305674 translates to 0x5674
    [  210.143981]  DBG> wl1271_chip_wakeup CHIP ID = 0x4030111

    [  210.143981]  DBG> wl1271_setup
    [  210.143981]  DBG> wl1271_fetch_firmware
    [  210.171905]  DBG> wl1271_load_firmware
    [  210.176727]  DBG> wl1271_read32
    [  210.176727]  addr 0x305674 translates to 0x1a634
    [  210.176757]  DBG> wl1271_load_firmware CHIP ID = 0x4030111

    [  210.337738]  DBG> wl1271_boot_run_firmware
    [  210.337829]  DBG> wl1271_read32
    [  210.337829]  addr 0x305674 translates to 0x1ce34
    [  210.337890]  DBG> wl1271_boot_run_firmware CHIP ID = 0x1110000

    [  210.337951]  DBG> wl1271_boot_run_firmware chip id 0x1110000  vs wl.chipid 0x4030111
    [  210.337951] wl1271: ERROR chip id doesn't match after fiwl1271_load_firmware CHIP ID = 0x4030111 rmware boot


    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Elad Raz92038
    Posted by Elad Raz92038
    on Jan 04 2012 03:59 AM
    Expert1580 points

    I don't think that the power management has any effects (Enterting to ELP shouldn't change HW register reads), I still thinks that the "partition" command changes the register maps. (Maybe old driver) Can you put trace on the partition command as well?

    - Elad Raz

    CTO

    www.integrity-project.com

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Jan 04 2012 09:42 AM
    Intellectual430 points

    Here is a trace with some info about calls to wl1271_set_partition:

    [  249.885498] DBG> wl1271_set_partition reg_start 00300000 reg_size 00008800 mem_size 00000000
    [  249.886016]  DBG> wl1271_fw_wakeup
    [  249.886047]  DBG> wl1271_read32
    [  249.886047]  addr 0x305674 translates to 0x5674
    [  249.886077]  DBG> wl1271_chip_wakeup CHIP ID = 0x4030111
    [  249.886077]  DBG> wl1271_setup
    [  249.886077]  DBG> wl1271_fetch_firmware
    [  249.924285]  DBG> wl1271_load_firmware
    [  249.926422] DBG> wl1271_set_partition reg_start 00310000 reg_size 00006000 mem_size 00014FC0
    [  249.927032] DBG> wl1271_set_partition reg_start 00300000 reg_size 0000A000 mem_size 00014FC0
    [  249.928039] DBG> wl1271_set_partition reg_start 00300000 reg_size 0000A000 mem_size 00014FC0
    [  249.928741]  DBG> wl1271_read32
    [  249.928771]  addr 0x305674 translates to 0x1a634
    [  249.928771]  DBG> wl1271_load_firmware CHIP ID = 0x4030111
    [  249.928802] DBG> wl1271_set_partition reg_start 00300000 reg_size 00008800 mem_size 000177C0

    <many more calls deleted from trace (all the same for reg_start, reg_size, mem_size) ...>

    [  250.111755] DBG> wl1271_set_partition reg_start 00300000 reg_size 00008800 mem_size 000177C0

    [  250.114196]  DBG> wl1271_boot_run_firmware
    [  250.114288]  DBG> wl1271_read32
    [  250.114288]  addr 0x305674 translates to 0x1ce34
    [  250.114349]  DBG> wl1271_boot_run_firmware CHIP ID = 0x1110000
    [  250.114410]  DBG> wl1271_boot_run_firmware chip id 0x1110000  vs wl.chipid 0x4030111
    [  250.114410] wl1271: ERROR chip id doesn't match after firmware boot
    [  250.114440]  DBG> wl1271_sdio_power_off

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bernard Seller
    Posted by Bernard Seller
    on Feb 23 2012 11:23 AM
    Verified Answer
    Verified by Bernard Seller
    Intellectual430 points

    Just to close on my issue in case people run into the same problem

    - my problem was due to a quirk  in  the SDIO core we are using(It was reading 8B when I was asking for 4B in an SDIO cmd 53)

     once this issue was resolved I ran into another problem

    I was getting "ELP wakeup timeout"  error

    and this was due to the fact that my GPIO pin was not set properly to get the interrupt

    I could verify using /proc/interrupts that I was not getting the interrupts

       thanks Elad for your suggestions

    Bernard

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use