2016-07-18 11:54 PM
We are using SPI0 in our application and its connected to two device chip as follows:
1. CS0 - PA152. CS1 - PB12Please tell give the steps to configure the SPI using spc5 studio with 2 chip selection for data transmit and receive.2016-07-19 02:14 AM
Hi,
As a starter point, you can import the DSPI test application for Bolero B using the wizard. It configure and uses pins for DSPI0 using variuos configurations. If any other further question, do not hesitate to contact us. Regards, Procolo2016-07-19 03:56 AM
Thank you very much ,i got sample code and need one more help to configure two chip selection pin with continuous mode.
1. CS0 - PA152. CS1 - PB122016-07-19 04:06 AM
Hi,
you should create two configurations.
in both you should select the mode Hardware(continuos), while you should select respectively PCS0 and PCS1 in the PCS line field.
Remember to correclty configure the pin in PINMAP wizard.
Regards,
Procolo2016-07-20 12:11 AM
Thank you very much for your support,
The chip selection is working,but i found one problem in the spi MOSI transmission.We are sending 0x00,0x00 using spi_lld_exchange function for reading.but in the MOSI line we are getting like 0x01,0x01.2016-07-20 06:24 AM
Hi,
we have verified with our test application SPC560BCxx_RLA DSPI Test Application, that you can select from the Application Wizard (magic wand icon), that the MOSI is to 0x0 when you transfer the byte 0x0 by using the spi_lld_exchange function. If you have a different behavior, the issue could be in the SPI PIN configuration. Could you share you SPI PIN configuration (content of the I/O settings tab in the Board Component)?
Regards,
Luigi
2016-07-21 02:03 AM
This is the pin configuration of spi
static const spc_siu_init_t spc_siu_init[] = { {PCR(PORT_A, PIN_LED0), PAL_LOW, PAL_MODE_OUTPUT_PUSHPULL}, {PCR(PORT_A, PIN_SIN), PAL_LOW, PAL_MODE_INPUT}, {PCR(PORT_A, PIN_SOUT), PAL_LOW, PAL_MODE_OUTPUT_ALTERNATE(1)}, {PCR(PORT_A, PIN_SCK), PAL_LOW, PAL_MODE_OUTPUT_ALTERNATE(1)}, {PCR(PORT_A, PIN_CSACC), PAL_LOW, PAL_MODE_OUTPUT_ALTERNATE(1)}, {PCR(PORT_B, PIN_UART0TX), PAL_LOW, PAL_MODE_OUTPUT_ALTERNATE(1)}, {PCR(PORT_B, PIN_UART0RX), PAL_LOW, PAL_MODE_INPUT}, {PCR(PORT_B, PIN_CSFLASH), PAL_LOW, PAL_MODE_OUTPUT_ALTERNATE(3)}, {PCR(PORT_C, PIN_INT2), PAL_LOW, PAL_MODE_INPUT}, {PCR(PORT_C, PIN_INT1), PAL_LOW, PAL_MODE_INPUT}, {-1, 0, 0}};2016-07-21 04:50 AM
Hi,
please, could you also provide me the value of the macros PIN_SIN, PIN_SOUT, PIN_SCK and PIN_CSACC? Moreover, could you provide me the version of SPC5Studio that you are using? Best Regards,Luigi2016-07-22 02:05 AM
Thank very much spi is working.
I corrected the hardware continuous mode and it is working2016-07-22 03:23 AM
good news!
Please, feel free to contact us for any kind of support. Regards,Luigi