Lpspi configuration in S32DS -- what if you can't get it to generate the values you need?

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

Lpspi configuration in S32DS -- what if you can't get it to generate the values you need?

113 Views
robthedude
Contributor I

I'm using an S32DS project to create an application for S32K311 (using the S32K31XEVB-Q100).

This application uses Lpspi in controller mode to communicate with another SPI peripheral.

Using some debug logs and a logic analyzer, I ended up making minor tweaks to the configuration until I got communications to work reliably.

But now that I've done that, I can't figure out how to represent these modifications in S32DS, and I'm worried it will obliterate them next time I change something and choose "Update Code".

1) The particular options I can't seem to figure out are setting CPHA to 0 (everything I've tried in S32DS sets it to 1; I did manage to get CPOL to 0) and setting CCR[DBT] to 0xFF.  Is it possible to modify the fields in the project to produce these values in the generated configuration code?

2) If not, how do people usually deal with this?  I'm considering making a new variable that I will initialize with the content of the S32DS variable at runtime, then overwrite the specific values I need modified.  But I'm curious if others achieve this in a different way.

Thanks.

Rob

0 Kudos
Reply
1 Reply

77 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@robthedude

I roughly understand what you mean.

For your situation, I think it might be most convenient to modify the register directly.

0 Kudos
Reply