Hi @mariuslucianand
Thanks for your response quickly.
Really appreciate about your suggestion. We currently design same as your suggestion.
small piece of generated code below will tell you more :
/* Output and update for function-call system: '<Root>/Subsystem' */
/* S-Function (gpio_s32k_output): '<S6>/__' incorporates:
* Constant: '<S2>/Constant'
*/
/* GPOPORTD3 Data Signal Update */
if (false) {
PINS_DRV_SetPins(PTD, 1UL<<3);
} else {
PINS_DRV_ClearPins(PTD, 1UL<<3);
}
/* S-Function (gpio_s32k_output): '<S6>/_' incorporates:
* Constant: '<S2>/Constant1'
*/
/* GPOPORTE3 Data Signal Update */
if (true) {
PINS_DRV_SetPins(PTE, 1UL<<3);
} else {
PINS_DRV_ClearPins(PTE, 1UL<<3);
}
/* S-Function (gpio_s32k_output): '<S6>/ ' incorporates:
* Constant: '<S2>/Constant2'
*/
/* GPOPORTE0 Data Signal Update */
if (true) {
PINS_DRV_SetPins(PTE, 1UL<<0);
} else {
PINS_DRV_ClearPins(PTE, 1UL<<0);
}
/* S-Function (gpio_s32k_output): '<S6>/____' incorporates:
* Constant: '<S2>/Constant3'
*/
/* GPOPORTA3 Data Signal Update */
if (true) {
PINS_DRV_SetPins(PTA, 1UL<<3);
} else {
PINS_DRV_ClearPins(PTA, 1UL<<3);
}
/* S-Function (lpspi_s32k_master_transfer): '<S7>/LPSPI_Master_Transfer3' incorporates:
* Constant: '<S7>/Constant3'
*/
{
/* Update the peripheral CS to select the slave you want to send data to */
LPSPI_DRV_SetPcs(1, LPSPI_PCS0, LPSPI_ACTIVE_LOW);
/* Send data */
LPSPI_DRV_MasterTransferBlocking(1, msdi_attemptViet_ConstP.pooled4,
&msdi_attemptViet_B.LPSPI_Master_Transfer3[0], 3, 10);
}
we clear the GPIO which is connected to SPI slave that we want to transfer data to.
But, in the generated code above, there is the line :
LPSPI_DRV_SetPcs(1, LPSPI_PCS0, LPSPI_ACTIVE_LOW);
does it clear the LPSPI_PCS0 pin ?
and if it does, it will impact to our hw design, because when we want transfer data to other SPI slave.
NXP MBD keep generating the " LPSPI_DRV_SetPcs(1, LPSPI_PCS0, LPSPI_ACTIVE_LOW);"
thanks
Viet