Skip to main content
Bwang.3
Associate III
May 19, 2023
Question

Hello, when I use SPC5Studio software to program the SPC582B microcontroller, how can I set the data sent by SPI communication through SPC5Studio ?

  • May 19, 2023
  • 2 replies
  • 1248 views

Hello, when I use SPC5Studio software to program the SPC582B microcontroller, how can I set the data sent by SPI communication through SPC5Studio? Because I cannot find the SPI module's menu or options for setting the content of data sent in the SPC5Studio software! Can you tell me!

    This topic has been closed for replies.

    2 replies

    ODOUV.1
    ST Employee
    May 19, 2023

    Hello,

    import and look at this Chorus 1M example : "SPC582Bxx_RLA DSPI Test Application for Discovery"

    Best regards.

    Bwang.3
    Bwang.3Author
    Associate III
    May 19, 2023

    If I want to use DSPI to send two data 0x26 and 0x69, where should I fill in these two data? I couldn't find an option in the "SPC582Bxx_RLA DSPI Test Application for Discovery" application to place the two data I need to send!

    ODOUV.1
    ST Employee
    May 19, 2023

    You have to use the SPD driver like in the example

    start the driver:

    spi_lld_start(&SPID1, &spi_config_low_speed);

    put your two bytes in txbuf:

    txbuf[0] = 0x26;

    txbuf[1] = 0x69;

    send these 2 bytes through API:

    spi_lld_send(&SPID1, 2, txbuf);

    then stop the driver:

    spi_lld_stop(&SPID1);