# STM32 + SimpleFOCShield + GM5208-12 + AS5048A

**URL:** https://community.simplefoc.com/t/stm32-simplefocshield-gm5208-12-as5048a/5610
**Category:** hardware support
**Tags:** stm32
**Created:** [October 7, 2024, 5:58pm UTC](https://community.simplefoc.com/t/stm32-simplefocshield-gm5208-12-as5048a/5610 "2024-10-07T17:58:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vivi](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/v/ecc23a/32.png) [@vivi](https://community.simplefoc.com/u/vivi)
#### Post date: [October 7, 2024, 5:58pm UTC](https://community.simplefoc.com/t/stm32-simplefocshield-gm5208-12-as5048a/5610/1 "2024-10-07T17:58:48Z")

</div>

Hi! I’m doing a project where I use STM32 + SimpleFOCShield + GM5208-12 (brushless motor) + AS5048A (encoder SPI or PWM). On every example of FOC libraries I’ve seen that they use Channel A,B,I,GND,5v encoder on the shield. Is it possible to make it work with an SPI wiring ?

---

<div class="post-metadata">

### Author: ![VIPQualityPost](https://community.simplefoc.com/user_avatar/community.simplefoc.com/vipqualitypost/32/4420_2.png) [@VIPQualityPost](https://community.simplefoc.com/u/VIPQualityPost)
#### Post date: [October 8, 2024, 3:12am UTC](https://community.simplefoc.com/t/stm32-simplefocshield-gm5208-12-as5048a/5610/2 "2024-10-08T03:12:39Z")

</div>

What STM32 are you using?  
On the R3 the dedicated SPI pins are 13, 12, 11, 10, and these are used elsewhere on the board so not easily to use for SPI. But the STM32 pinout is generally more flexible, so you might be able to find some free pins on an SPI peripheral, especially if you are not using 2x shields.

---

<div class="post-metadata">

### Author: ![vivi](https://community.simplefoc.com/letter_avatar_proxy/v4/letter/v/ecc23a/32.png) [@vivi](https://community.simplefoc.com/u/vivi)
#### Post date: [October 11, 2024, 11:33am UTC](https://community.simplefoc.com/t/stm32-simplefocshield-gm5208-12-as5048a/5610/3 "2024-10-11T11:33:35Z")

</div>

I use a NUCLEO-64 F446RE
