KSDK I2C FreeRTOS Driver Bug?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

KSDK I2C FreeRTOS Driver Bug?

ソリューションへジャンプ
1,799件の閲覧回数
ryanbryngelson
Contributor I

Hello,

 

I'm working on a project that makes use of KSDK 2.0 and FreeRTOS on a KW41 using I2C.  I noticed I was receiving a valid response (return value of 0) from I2C_RTOS_Transfer when the device wasn't connected (which ultimately resulted in a NAK as far as the KW41 was concerned).  I traced the issue down to I2C_RTOS_Callback located in KSDK_2.0/devices/MKW41Z4/drivers/fsl_i2c_freertos.c.  The status variable passed into the callback is correctly reflecting the NAK on the bus, however, it's not copied to handle->async_status, which is what is returned from I2C_RTOS_Transfer.  Here's the method in question with my addition in red...

 

static void I2C_RTOS_Callback(I2C_Type *base, i2c_master_handle_t *drv_handle, status_t status, void *userData)
{
    i2c_rtos_handle_t *handle = (i2c_rtos_handle_t *)userData;
    BaseType_t reschedule;

 

    handle->async_status = status;

 

    xSemaphoreGiveFromISR(handle->sem, &reschedule);
    portYIELD_FROM_ISR(reschedule);
}

 

Thoughts?

 

Ryan

ラベル(1)
0 件の賞賛
返信
1 解決策
1,482件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Ryan:

Yes, I can reproduce your issue on my side. We will add a status propagation . 

This fix will be merged to next release.

Thank you very much.

Regards

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,483件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

Hi Ryan:

Yes, I can reproduce your issue on my side. We will add a status propagation . 

This fix will be merged to next release.

Thank you very much.

Regards

Daniel

0 件の賞賛
返信
1,482件の閲覧回数
danielchen
NXP TechSupport
NXP TechSupport

HI Ryan:

Thank you for your input, let me reproduce your issue in my side first, I will update you when I have results.

Regards

Daniel

0 件の賞賛
返信