Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCUXpresso I2C: Handle 0 byte write #3502

Merged
merged 1 commit into from
Dec 30, 2016

Conversation

mmahadevan108
Copy link
Contributor

Description

Update I2C driver to handle zero byte writes.

Status

**READY

@mmahadevan108
Copy link
Contributor Author

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 23, 2016

Thanks, will run some tests locally with CI shield. will report back

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 28, 2016

Before:

+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| target       | platform_name | test suite    | test case                          | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 10  Bytes         | 1      | 0      | OK     | 0.06               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 100 Bytes         | 1      | 0      | OK     | 0.06               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 2 Bytes           | 0      | 3      | FAIL   | 0.22               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR Single Byte       | 0      | 2      | FAIL   | 0.21               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  Instantiation of I2C Object | 1      | 0      | OK     | 0.07               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  LM75B Temperature Read      | 1      | 0      | OK     | 0.06               |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+

After this patch:

| target       | platform_name | test suite    | test case                          | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 10  Bytes         | 1      | 0      | OK     | 0.06               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 100 Bytes         | 1      | 0      | OK     | 0.08               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 2 Bytes           | 1      | 0      | OK     | 0.05               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR Single Byte       | 1      | 0      | OK     | 0.07               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  Instantiation of I2C Object | 1      | 0      | OK     | 0.07               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  LM75B Temperature Read      | 1      | 0      | OK     | 0.06               |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+

fixes seeing issues with I2C, tested for K64F GCC

base->S = kI2C_IntPendingFlag;

if (base->S & kI2C_ReceiveNakFlag)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{ should be aligned on the line above

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one coding style nit, LGTM

Signed-off-by: Mahadevan Mahesh <Mahesh.Mahadevan@nxp.com>
@mmahadevan108
Copy link
Contributor Author

I have updated the PR to include fix for coding convention issue.

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 28, 2016

/morph test

@mbed-bot
Copy link

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1333

All builds and test passed!

@0xc0170 0xc0170 merged commit 518b072 into ARMmbed:master Dec 30, 2016
@mmahadevan108 mmahadevan108 deleted the I2C_Zerobyte_Write branch December 30, 2016 13:24
aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets

3459: Target: Add new target UBLOX_EVK_NINA_B1 ARMmbed/mbed-os#3459

Fixes and Changes

3430: Fix ci shield eeprom test ARMmbed/mbed-os#3430
3381: STM32F1 : map ST HAL assert into MBED assert ARMmbed/mbed-os#3381
3389: STM32F2 : map ST HAL assert into MBED assert ARMmbed/mbed-os#3389
3390: STM32F3 : map ST HAL assert into MBED assert ARMmbed/mbed-os#3390
3410: STM32L4 : map ST HAL assert into MBED assert ARMmbed/mbed-os#3410
3422: Enable CAN on DISCO_F303VC ARMmbed/mbed-os#3422
3442: Dev stm i2c f1 ARMmbed/mbed-os#3442
3460: KSDK I2C: Update the return value to match the API documentation change ARMmbed/mbed-os#3460
3472: [RZ/A1H]Fix TTB setting of RO_DATA area ARMmbed/mbed-os#3472
3451: Rename KSDK2 to MCUXpresso. This is the new name of this package ARMmbed/mbed-os#3451
3391: STM32F4 : map ST HAL assert into MBED assert ARMmbed/mbed-os#3391
3454: STM32: Refactor lp_ticker.c + rtc_api.c + sleep.c + rtc_api_hal.h files  ARMmbed/mbed-os#3454
3489: NUCLEO_F103RB - Correct CAN and PWM alternate-functions ARMmbed/mbed-os#3489
3405: Repair the transmit mailbox (0,1,2) empty interrupt flag not clear BUG ARMmbed/mbed-os#3405
3502: MCUXpresso I2C: Handle 0 byte write ARMmbed/mbed-os#3502
3365: [NUC472/M453] Support USB device ARMmbed/mbed-os#3365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants