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
903 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
1 Solution
880 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
3 Replies
893 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
888 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
881 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