Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Mar 2014 05:58 AM by  Zile
I2C latency on the Torpedo Wireless and Linux
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Zile
New Member
New Member
Posts:45


--
15 Nov 2013 10:47 AM

     

    Hello,

    I have connected battery gauge on the i2c-2 bus of the Torpedo Wireless. I am able to read gauge registers from application with read/write to file or from console with i2cget command, but sometimes I got some kernel warnings like:

    omap_device: omap_i2c.2: new worst case deactivate latency 0: 122070
    user.warn kernel: [  420.015838] omap_device: omap_i2c.2: new worst case deactivate latency 0: 122070

    or,

    omap_device: omap_i2c.2: new worst case activate latency 0: 244140
    user.warn kernel: [  680.015106] omap_device: omap_i2c.2: new worst case activate latency 0: 244140

    And "new worst case (de)activate latency" each time got higher value.

    It seems like that Linux freezes, when this warning appear, because I have some streaming over WiFi, and in the same moment when this happen I lose couple of packets. 
    After some time (I suppose when  latency is set to large enough value) this warnings doesn't appear, and I don't lose packets.

    So, my questions are:
    Why this happens?
    How I can resolve this issue?
    Is there any way to read this latency value and set to some higher value?

    Regards,
    Dragan

     

    steven.eckhoff
    Basic Member
    Basic Member
    Posts:192


    --
    21 Nov 2013 08:54 AM
    Zile,

    The message originates from the following function. This has to do with wakeup latency.

    /**
    * _omap_device_activate - increase device readiness
    * @od: struct omap_device *
    * @ignore_lat: increase to latency target (0) or full readiness (1)?
    *
    * Increase readiness of omap_device @od (thus decreasing device
    * wakeup latency, but consuming more power). If @ignore_lat is
    * IGNORE_WAKEUP_LAT, make the omap_device fully active. Otherwise,
    * if @ignore_lat is USE_WAKEUP_LAT, and the device's maximum wakeup
    * latency is greater than the requested maximum wakeup latency, step
    * backwards in the omap_device_pm_latency table to ensure the
    * device's maximum wakeup latency is less than or equal to the
    * requested maximum wakeup latency. Returns 0.
    */
    static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)

    Which CPU governor are you using? (i.e. cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)

    Try setting this to performance and see if these messages go away.
    Zile
    New Member
    New Member
    Posts:45


    --
    18 Mar 2014 05:58 AM
    Hello,

    Problem was because kernel freezes when messages with printk is printed from kernel. Everytime when some message from kernel is printed I lose couple of packets. I commented these warnings with device latency.

    Regards,
    Zile
    You are not authorized to post a reply.