S32K14x_MCAL_4_2_RTM_104 :The problem when the SPI is configured as a slave

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K14x_MCAL_4_2_RTM_104 :The problem when the SPI is configured as a slave

Jump to solution
1,308 Views
ou_gangxun
Contributor II

When I configured a SpiExternalDevice in slave mode and selected the appropriate PCS, when generating the code, EB chose to ignore the PCS.

0 Kudos
Reply
1 Solution
1,285 Views
hungnguyenphi
NXP Employee
NXP Employee

Hello @ou_gangxun ,

 

Yes, you are right. Thank you for raising this point. I will create a ticket for this case.

 

Best regards,

Hung.

View solution in original post

0 Kudos
Reply
3 Replies
1,298 Views
hungnguyenphi
NXP Employee
NXP Employee

Hello @ou_gangxun ,

 

I just check it and I see that it is not an issue.

In slave mode we do not need to choose CS for transmitted command in the TDR register. So we have no change in the configuration of register TDR when user change the PCS.

Because default value of SpiCsPolarity is low, so could you please try to change the SpiCsPolarity to high. Then you will see that the SpiCsIdentifier will effect the generated code.

 

Best regards,

Hung.

0 Kudos
Reply
1,293 Views
ou_gangxun
Contributor II

But I found that when using DMA transfer and SPI together, if the register bit corresponding to PCSx is not set, such as LPSPI_TCR_PCS3_EN_U32, then the transferred data will drift indefinitely, and the randomness of the first byte of the DMA buffer will be omitted

0 Kudos
Reply
1,286 Views
hungnguyenphi
NXP Employee
NXP Employee

Hello @ou_gangxun ,

 

Yes, you are right. Thank you for raising this point. I will create a ticket for this case.

 

Best regards,

Hung.

0 Kudos
Reply