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 12 Dec 2013 03:08 PM by  steven.eckhoff
WinCE I2C Baudrates
 0 Replies
Sort:
You are not authorized to post a reply.
Author Messages
steven.eckhoff
Basic Member
Basic Member
Posts:192


--
12 Dec 2013 03:08 PM

    Q: How would I go about adjusting the bit rate of the I2C2 port of the DM3730 SOM-LV running Windows CE? The I2C driver supplied by Logic does not seem to offer alternative bit rates, and I'm finding the default bit rate (seems to be ~ 400 Kbps) incompatible with some of my I2C components.

    A:  See the following code in PLATFORM/LOGIC_ARM_A8/SRC/OAL/OALI2C/i2c_init.c:

    static
    BOOL
    OALI2CSetDeviceBaudrate(
        I2CDevice_t      *pDevice,
        DWORD             baudIndex
        )
    {
        pDevice->currentBaudIndex = baudIndex;
        OUTREG16(&pDevice->pI2CRegs->PSC,  _rgScaleTable[pDevice->currentBaudIndex].psc);
        OUTREG16(&pDevice->pI2CRegs->SCLL, _rgScaleTable[pDevice->currentBaudIndex].scll);
        OUTREG16(&pDevice->pI2CRegs->SCLH, _rgScaleTable[pDevice->currentBaudIndex].sclh);

        return TRUE;
    }

    You are not authorized to post a reply.