Problem with SPI functions in IAR Kickstart for KE02Z FRDM board.

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

Problem with SPI functions in IAR Kickstart for KE02Z FRDM board.

455件の閲覧回数
davetelling
Contributor I

I was working with the SPI on a FRDM-KE02Z board, and was modifying the SPI_Master_Poll demo workspace by changing the clock polarity and phase bits. There is a line in the app code:

sSPIConfig.sSettings.bClkPhase1        = 1;

This allows (or should allow) one to change the clock phasing as desired. However, I found that if I set that parameter to '0' (zero), the clock phase did not change. In looking through the various driver files, I found this, which is used to determine the level to set that particular bit:

if( pConfig->sSettings.bClkPhase1)
{
    SPI_SetClockPhase(pSPI,1);
}

Since the phase bit comes out of reset as a '1', commanding a '0' will never happen, because the "if" statement only does something  if the commanded bit is true (or set to '1'). To fix this, I just added a following "else" options:

else

{

     SPI_SetClockPhase(sSPI,0);

}

This resolved the problem. However, I noticed other, similar bit test areas with the same issue, so those need to  fixed, also.

0 件の賞賛
返信
1 返信

366件の閲覧回数
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Dave,

Thank you for the info.

That should be the KE02 SPI module driver software issue.

I had reported this issue to related KE product engineer and it will be fixed at next released version.

Thanks again.


Have a great day,
best regards,

Ma Hui

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信