Skip to main content
rached benameur
Associate
May 3, 2018
Solved

STM32 MCU and the STPM01 AFE how to establish the SPI communication between them?

  • May 3, 2018
  • 1 reply
  • 1237 views
Posted on May 03, 2018 at 17:14

Hi, i am an embedded electronic engineer and lately i have a project named 'plug meter' based on an STM32 MCU and the STPM01 AFE, but i couldn't establish the SPI communication between AFE and MCU because there are no libraries to read and write through SPI, please help me!

    This topic has been closed for replies.
    Best answer by rached benameur
    Posted on May 09, 2018 at 10:18

    No, in fact i am willing to design my own board, using a MCU from ST (STM32f030K6T) and an AFE module (STPM...).

    I imagined this design: 

    0690X0000060B1tQAE.png

    There for, i need to establish the low level communication layer between MCU and AFE, but i couldn't find in your datasheet, some software libraries to facilitate the communication; (only hardware description of SPI :

    0690X0000060B1xQAE.png

    Am i forced to create my own Hardware Abstraction Layer (HAL) for the AFE ??

    There is other companies providing a regular SPI communication Interface (already compatible with any MCU).

    So my question is: 

    Is there any

     libraries to read and write through SPI ? if not how can i do it then (considering that i will but the STPM.. and MCU separably and design my board)?

    Thank you 

    1 reply

    alok
    Visitor II
    May 9, 2018
    Posted on May 09, 2018 at 06:04

    You design is something like this... ?

    http://www.st.com/en/evaluation-tools/steval-rfplug01.html

    I suggest to use STPM32/ STPM33 / STPM34

    Look for Evaluation Tool Software at

    http://www.st.com/en/data-converters/stpm33.html

     
    rached benameur
    rached benameurAuthorBest answer
    Associate
    May 9, 2018
    Posted on May 09, 2018 at 10:18

    No, in fact i am willing to design my own board, using a MCU from ST (STM32f030K6T) and an AFE module (STPM...).

    I imagined this design: 

    0690X0000060B1tQAE.png

    There for, i need to establish the low level communication layer between MCU and AFE, but i couldn't find in your datasheet, some software libraries to facilitate the communication; (only hardware description of SPI :

    0690X0000060B1xQAE.png

    Am i forced to create my own Hardware Abstraction Layer (HAL) for the AFE ??

    There is other companies providing a regular SPI communication Interface (already compatible with any MCU).

    So my question is: 

    Is there any

     libraries to read and write through SPI ? if not how can i do it then (considering that i will but the STPM.. and MCU separably and design my board)?

    Thank you 

    alok
    Visitor II
    May 12, 2018
    Posted on May 12, 2018 at 06:17

    For new designs STPM32/33/34 recommended

    Look for Evaluation Tool Software at

    /external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fen%2Fdata-converters%2Fstpmhtml