Hi MVR,
I'm Nam from NXP RTD, i'm in charge of topic from Daniel so i comment directly here to discuss easier.
I saw the error came from Generate code, not Configure tool. The Configuration not report error, but the Generate value is not in range of delay time in PrescaledClock

About the value of TimeClk2Cs, it's the value of delay time in SCKPCS field, in range of 1~255 clock cycle which calculated with Prescaler as the field in TCR register.

The clock be calculated from Bus clock (which is 40M Hz if you not choosing Dual Clock of SPI), and the PrescalerValue is 2^(Prescaler) which calculated here:

With Busclock as 40M and DesiredBaudrate as 500K, the devide value should be 80, which mean the PrescalerValue is 1 (as 2^0) and the SckDiv will be 78.
I tried to enable the DesiredBaudrateConfig with corresponding values, confirmed it's correct.


So with PrescalerValue as 1, the PrescaledClock will equal with BusClock which is 40M Hz, and the Delaytime will have to in range of 2.5E-8 ~ 6.4E-6
As my view, i don't see problem with EB Config in my side, compare with RM of SPI.
I'm doubting about your configuration in DS (.mex file) in 2 points:
- Do you use DesiredBaudrateConfig and apply another Baudrate different with 500K? This might change the value of PrescalerValue.

- Your clock of SPI be changed somewhere.
Normally, the BusClock will be the reference clock which configured in this node, refered to Mcu

In case you enable DualClock mode, the BusClock will be BusClockAlternate

You should not enable the AlternateClockRef node.
Can you help me check these 2 points?
I have few questions with your DS tool configuration:
- Do you use the same package RTD 4.0.0 HF01 in DS?
- In DS when you configure the value of Clk2Cs, can you give me the range of this node (in DS) in this time?
- In generated code, can you give me value of LPSPI_CCR_SCKPCS?
Thank you,
Nam.